JdbcodbcDriver uses the wrong charSet for interpreting the result set data

Hi everyone,
I?m having trouble getting results from a MS Access database which uses Greek characters. All the characters in the range 0-127 are returned good but I get ??? for all above 127.
Here is some more details:
OS: win2k
Local setting for current user: Greek (not that it makes a difference)
Default Language setting for the System: English (Astralia). This uses charSet Cp1252 or ISO 8859-1 encoding.
Environment: JBuilder 7.0
JDK: 1.4.1
DB: MS Access
DB charSet: Cp1253 (Greek encoding or ISO 8859-7)
Connection method:
     java.util.Properties prop = new java.util.Properties();
     prop.put("user" , userName);
     prop.put("password" , password);
     //driver is "sun.jdbc.odbc.JdbcOdbcDriver";     
     //none of these work
     //prop.put("charSet", "UTF-8");
     //prop.put("charSet", "Greek");
     prop.put("charSet", "Cp1253");
     connection = DriverManager.getConnection(MY_ACCESS_DB,prop);
DataSet Access method:
     // run query and get resultSet rs here
     char[] cBuff= new char[1000];
     // I have tried getString(), getBytes(), getBinaryStream also
     Reader rReader = rs.getCharacterStream(3);
     BufferedReader fIn = new BufferedReader(rReader);
     int res = fIn.read(cBuff, 0, 999);
     // contents of cBuff is incorrect here
I have also used -Dfile.encoding=Cp1253 in command line which seems to change the default charSet of the JVM. Tested
     String en = new InputStreamReader(System.in).getEncoding();
     System.out.println("Default encoding: " + en);
By enabling trace and looking at the content of the resultSet object it shows that
rs.OdbcApi.charSet = "Cp1253"
So I'm absolutely stumped. The only possible problems I can think of is either a bug in the jdbcodbcDriver or in my native ODBC driver. The latter is less likely since I connected to the same datasouce using a different application and get the right result.
One more thing that may be helpful, if I set up the default charSet under Win2K to "Greek" (that is setting default language setting in Regional Options under Control Panel)
Everything works fine.
Is there anyone out there with answer to my problem?
Thanks in advance.

Tried your program and it does exactly as I expected. I get a whole lot of '?'s with my OS default language setting on English but it works fine as soon as I set it to Greek. It does not make a difference if I change the "input language" on the language bar (shift+ctrl) to Greek or not. Or if I change the charSet in your program to something else. Which bring up the question what do you use the charSet setting on your program for? If it is for byte conversion, I don't think you need it since the OS default charset is used by ResultSet.GetString and that needs to be set anyway.
Anyhow your program basically behaves exactly the same way as mine does. I am almost 100% sure that the problem is with the properties used (or not used) when creating the connections. There has got to be a (provider) property like "useUnicode" or "charSet" or something that is passed through jdbcodbc bridge to ODBC to MS Access to force it to return the result set in UTF-8 format. I confirmed this by using Visual C++ data access program that i wrote (which has the same sort of problem). All other MS Office products know about this property that why they work when i imort data from them.
This means I don't have a jdbc or even a java problem but my problem is MS Access related. So I�m going to post a question on an MS Access user group (if I find one) and see what I get). Thanks for your help with this.
By the way AOKabc crashed once and froze another time. I think it had more to do with the libraries you are using rather than your code. I have a trace log if you are interested.
Soheil

Similar Messages

  • I used the wrong ID for iCloud on my iphone 5. It is linked to an email that no longer exists. Do I have to delete my iCloud completely and set it up all over again?

    I used the wrong ID for iCloud on my iphone 5. It is linked to an email that no longer exists. Do I have to delete my iCloud completely and set it up all over again?

    You can change the linked email/sign in email for your iCloud and Apple ID accounts from 1 site,
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Go to Manage your Apple ID
    Sign in with your current creditals
    On the left, click Name, ID and Email Addresses
    Under Apple ID and Primary Email Address, click Edit
    Type in your new Email.
    Go to Apple ID, click Edit
    Type in your new Email

  • Hello, i am using iphone 4. I made the wrong purchase for ipad.navturk live navigation i bought. just trying to do update. I would ask you to cancel the order. best regards.

    Hello, i am using iphone 4. I made the wrong purchase for ipad.navturk live navigation i bought. just trying to do update. I would ask you to cancel the order.
    best regards.

    There is no one here from Apple or iTunes support. You need to contact iTunes support here:
    http://www.apple.com/support/itunes/contact.html

  • My audiobook is for sale on iTunes, but iTunes is using the wrong "Preview" section.  The section they used is the only 30 sec. in Spanish and the rest of the book is in English. How can I get iTunes to fix this?

    My audiobook is for sale on iTunes, but iTunes is using the wrong "Preview" section.  The section they used is the only 30 sec. in Spanish and the rest of the book is in English. How can I get iTunes to fix this?

    Hello,
    Is your problem solved ? i got exactly the same problem... So boring...
    Thanks

  • HT204074 Used the wrong account for iCloud. How to Change it

    I just got an ipad, and I used the wrong account for iCloud. When I try to change it in settings it is greyed out.  How do I change I cloud so I can use this for work? 
    Never mind, I fixed it. I deleted the account, and put the new one in. Just a new interface.
    thanks;

    Welcome to the Apple Support Communities
    Open Settings > General > Restrictions and deactivate Restrictions

  • HT4539 I downloaded the wrong app for $8.99, and Iike to know how to get my money back as soon as  possible. I don't have iTunes on my computer so I can't use that

    I purchased the wrong app for $8.99 called Microsoft PowerPoint 2010 guide. And I would like my money back as soon as possible, and I don't have iTunes on my computer. Thanks.

    All purchases are considered final, but you can try contacting iTunes support and see if they will give you a refund or credit : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • This server does not have the module needed for interpreting traces

    I wan to use the Trace Control function of the Exchange Troubleshooting Assistant. I specifically want to look at the transactions of a particular user. When starting the function I get the message, "This server does not have the module needed for interpreting traces." I find nothing to tell me what the module is or where to get it.
    Specifically, I have a Macintosh user (bigwig in my organization) that insists on using Apple's 10.6 Calendar program, and constantly complains that his calendars are different between his 3 Macs and his iPhone. He claims to have put a calendar item on one machine, now it appears nowhere. And I have no way of proving what is going wrong. He hates Outlook and refuses to use it, he hates Entourage and refuses to use it. The local database for Entourage kept getting fouled up to the point that we kept having to delete this account and readding it to force the recreation of the database. The database tool never fixed the problems and of course he did a lot of customization that got destroyed every time we deleted the account settings and added them back.
    I really want to run the tool for a while and see if there is actually some transaction actually happening on the server side, so I would like to have these traces and be able to view them.
    SnoBoy

    See
    http://blogs.msdn.com/b/dvespa/archive/2011/05/27/how-to-use-extra-to-troubleshoot-rpc-client-access-issues.aspx.
    Just click on ok and proceed with set trace manually.
    Svetozar Petrović

  • I registered the wrong information for my iCloud account--I misspelled and now want to change it.  Help is needed to delete the account and start anew.

    I registered the the wrong information for my iCloud account--I misspelled the account name.  I accidentally spelled blackberry instead of blackbird.  How can I change this?

    If you don't want to use an alias you'll have to create a new account as you cannot change the @icloud.com address once created.  You'll have to create a new ID, verify the ID, then use the ID to create the new account, and migrate your iCloud data to the new account.
    If you are currently syncing data with iCloud, begin by saving any photo stream photos to your camera roll as mentioned above.  If you are syncing Notes with iCloud, you'll also need to open each of them and email them to yourself so they can be recreated in the new account.  Finally, if you are syncing any iWork documents with iCloud, turn off iCloud syncing in your iWork app settings.
    Then go to Settings>iCloud, tap Delete Account, and choose Keep on My iPhone when prompted.  Then in Settings>iCloud tap Get a Free Apple ID at the bottom, set up your new ID, verify the email address you use to create it by responding to Apple's verification email, then sign in with the new ID to create your new account.  Turn on your iCloud sync settings and choose Merge when prompted to upload your data to the new account.  When you turn Mail to On you will be prompted to create your new @icloud.com email address.  Be carefull to type it correctly as it cannot later be changed.

  • IPhoto - My iPhoto is not responding. When I click on iPhoto I get a never ending spinning beachball.  I almost think it is looking in the wrong place for the pictures.  How do I redirect it back to the Mac hard drive?

    My iPhoto is not responding.  Whenever I click on the iPhoto icon I get a twirling beachball.  It is as if the machine is looking in the wrong place for the photos.  How can I see where the machine is looking to find out if this is really the problem.  How can I see the path?

    Try this:  launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists. If it doesn't then the problem lies with your current library.
    If that's the case  Apply the two fixes below in order as needed: 
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #3, followed by #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • The disc is the wrong type for the operation

    Hello!
    I'm using DVD Studio Pro 4 and as I try to burn a double layer DVD I get a message saying "The disc is the wrong type for the operation". I've tried several brands, but I get the same message. What can possibly be wrong?
    Thanks for helping me!
    /Andreas from Sweden

    If you are trying to do this on the internal Superdrive they have problems writing to Dual Layer DVD disks of any make and or type.
    IMHO the DVD drive Apple uses is not very good.
    If this is a fairly new Mac system I suggest you take it to an Apple store and show them that it can't write to Dual Layer DVD discs of any make and maybe they will replace it with on e that will.

  • HT201363 After i wrote the wrong password for a few times my icloud account got disabled even after reseting my password.help

    After i wrote the wrong password for a few times my icloud account got disabled even after reseting my password.help

    Hi and Welcome to the Community!
    Failure of the BBID credentials will never wipe a BB. What actually happened was you incorrectly entered your user-created device-lock password too many times, and it then proceeded with wiping the device, as per the requirements of the security level accepted when enabling that feature. There is no way to stop it.
    Sorry.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Sorry if this is the wrong area for this post.

    I am thinking abut the Studio High Definition Powered Isolation Headphones with Noise Cancellation. In trying to find the place with the 2 miles/$1 spent and the lowest price is too much for my drained brain to handle. If anybody knows the place that gives the 2 miles/$ spent and the best price for the exact product please sent it my way. (Not the product but the answer) lol.
    I do have a question at Newegg they have a special add-on which I am not sure if it is worth getting. is there somebody who can tell me what this is and if it is worth getting the two together. Finally, the Headphones, I assume, plug into any MBP without any special connector. It would be awesome if they plug into the iPods too but I think there might be a small adapter.
    OK back to my main question, should I get the # Monster AICYP 200 S Y-Splitter With Volume Control/Mute. The detail about this combo is helpful to me but still I do not have enough info and lack the practical skills to make the right decision.
    newegg show details
    newegg hide details
    Model
    Brand Monster
    Model AICYP 200 S
    Type Accessories
    Features
    Features Connects two sets of headphones to iPhone, iPod, MP3 player, laptop, portable CD/DVD/game system, and SmartPhone.
    Plugs into any standard 1/8" (3.5mm) mini-headphone jack.
    Dual volume controls enable individual listening levels.
    Built-in mute switch allows quick breaks without interrupting other listener or pausing device.
    Rugged, compact construction ideal for travel and on-the-go use.
    Beats by Dr. Dre Studio High-Definition Headphones from Monster newegg
    2. Beats by Dr. Dre Studio High-Definition Headphones from Monster
    newegg show details
    Thanks for any help/advice on the volume/mute add-on.
    This s what is holding the big purchase back.

    Definitely the wrong place for this post. Try Amazon's forums or Newegg's forums. Also, Google is your friend.

  • HT1212 My little children Majd enter the wrong passcode for more than 10 times, my iPhone automatically got reset all data was deleted. I managed to retrieve the contacts only but I'm unable to retrieve my SMS's and my photos???? Can you help me please ??

    My little children Majd entered the wrong passcode for more than 10 times, my iPhone automatically got reset all data was deleted. I managed to retrieve the contacts only but I'm unable to retrieve my SMS's and my photos???? Can you help me please ???

    Hi,
    Did you ever back up your phone on the computer?
    Did you use photo stream at all?
    May I suggest changing your passcode lock to a letters and numbers lock (if not all ready it will make your iphone more secure and a restore lock otion shouldent be needed). Then change your setting as well preventing restore after ten incorect passwords.
    kc

  • I mistyped my apple id using a wrong email and forgot the password as well how can i solve this problem

    i mistyped my apple id using a wrong email and forgot the password as well how can i solve this problem?
    i can't access i cloud i need to change the id but i can't how can i do that?
    thanks

    Does she not remember her id nor her password ? She can see if she can get the id and the password for it reset via this : http://iforgot.apple.com
    Activation lock : http://support.apple.com/kb/TS4515

  • HT1947 iTunes keeps on saying I'm entering the wrong passcode for Remote, which I'm certain I'm not

    iTunes keeps on saying I'm entering the wrong passcode for Remote, which I'm certain I'm not. What can I do?

    Enter the correct passcode.
    If running a current version of iTunes and using the same Apple ID on the remote app and in iTunes, there is no need or prompt for a passcode.

Maybe you are looking for

  • Unclear about closing ResultSets

    Please provide clarification: The JavaDoc for ResultSets says that you don't have to explicitly close ResultSet objects since the RS will be closed when its defining Statement is closed or when the RS is garbage collected. The Oracle JDBC Developer's

  • 1st Generation iMac G5 with new main logic board but now no Bluetooth?

    Greetings: As an owner of a 1st generation iMac, I can finally report that my iMacG G5 is now working fine since the main logic board has been replaced because of bad capacitors. A NEW problem has been created. My internal bluetooth no longer works a

  • Multiple equipments with one ibase

    Hi, I downloaded equipments from ECC to CRM. But in CRM every equipment has created one ibase. how is  one customer's five equipments come to one ibase in crm. Anybody help me regarding this subject Please provide me any inputs for multiple object id

  • Packages..CLASSPATH ?!!

    HI, I'm quite a newbie to Java.Could anyone give me any link to a web page that gives me a detailed explanation on Packages and the Classpath environment variable. I'm getting some compile-time errors while working with Packages (probably because the

  • Instances Tab is missing

    Hi all, In the Oracle EM 11g, @ Dashborad I cannot see the Instances tab, by mistakenly it got deleted. When I click in the Instances, I see everything there but not instanceId's. At the bottom it says one column hidden. Can anyone help me to retrive