[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Unicode character retrieval from MS-Access

Posted on 2004-04-23
Medium Priority
Last Modified: 2013-12-03
I have been using MS-Access 2000 with Windows XP.I am storing Indian Language (telugu ) data in the databse by using Gautami Font ( unicode characters).i can view them in the databse. but when i retrieve those values using JSP & display on web page i am ending up with (?) marks instead of the data.In JSP i have written the encoding part .The driver used is Type 1 JDBC-ODBC driver. The browser supports UTF-8.Can u pls let me know where the problem is & the solution for this.
  thanks in  advance.
Question by:saritha_m123
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 10906524
Please select Indian Language in your IE

Best Regards

LVL 27

Expert Comment

ID: 10906570
Hi saritha_m123,

please see the following link, it might be of help


Author Comment

ID: 10915950
hi Benjamin,
   Thanks fo rthe answer you have given.but i have already set the language option in IE .I had doubt with the Odbc driver so i even tried using JDataConnect driver & then tried out the samething but of no use. I am ending up in (?) marks.Pls  help me out.
  No problem with the browser , when i enter a value in a textbox & then try to display it on browser then i am able to do it perfectly. I mean to say Indian Languages data is displayed on the browser.I am having problem while retrieving   from the database.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 27

Expert Comment

ID: 10915967
please excuse my ignorance, but is data.In JSP written in ASCI where you can open a Note Pad and read it? like HTML.


Author Comment

ID: 10916632
hello jaffer,
    Yes, in JSP the data is written in ASCI . we can read it in notepad like HTML.The mian problem is while I retrive from databse then the actual encoding is not being done.
   As i mentioned earlier I have used result_set.getUnicodeStream("emp_name");
  to retrive the unciode charcters from databse.
   In MS-Access I can view the data in my local language.
I hope now u undertsan dmy problem.
LVL 27

Expert Comment

ID: 10916679
I am not a pro, so I do things in a lower level,
I don't understand result_set.getUnicodeStream("emp_name");
so, lets do a test to find where the problem is (I did an HTML project with a Arabic fonts, so similar to your project):

Open your JSP data in a Note Pad and see if it is readable,
if it is NOT, then we will have to export it from Access in another way.


Author Comment

ID: 10945974
hello jaffer,
   I am using JSP ( Java Serv er Pages) & writing the web page .There i hvae been doing encoding.when i write a normal page & take a value from Textbox & thene display I am getting the encoding being done.But when i Try to get from database then i am having probl.
   Pls give me solution.
LVL 27

Expert Comment

ID: 10946587
I asked you something, but you didn't tell me the result, so I am asking you again,
Please do a test and tell me the result:
1- Export from your mdb to jsp.
2- open the exported file in Note Pad. Is it readable OR you get ????

I am trying to find where the problem is, so you have to follow with me please.

you have 3 places where things can go wrong:
1- Database, but you can read things OK there.
2- Outside Database:
A- Is it Wrong way to Export, so characters are not sent correctly,
B- Characters are Exported correctly, but the Internet Explorer setting needs to be adjusted.

Please do the test and give the result, so that we can take the next step.


Author Comment

ID: 10958408
hello jaffer,
    As u said there is no option to export from mdb to jsp.But there is an option from mdb to ASP. So i have exported into ASP & then I have run the file on IIS server.I could view the data on the web page in local languages.I am unable to understand the probl.
        When i write the same code in JSP( with differnet encodings) , I am unable to get the values. but in ASP I am getting the values ..So pls tell me where the probl is?  
  Is that b'cos Access & ASP are Microsoft Products.
   Do u know any way of exporting mdb into JSP?
  pls do reply.
LVL 27

Expert Comment

ID: 10958829
Hi Saritha
Not only mdb and jsp have a communication problem, it seems you and I have a communication problem too :-(
I have asked you to preform a task in my last comments, but you havn't done it, so I don't realy know if I can help.
I understood your problem, and I want to help, but you have to provide to me what I asked for.
please read my last comment and reply.


Author Comment

ID: 11003253
hi jaffer,
    As u said I have exported to a text document , then I got (?) marks. I hope this is the test u have asked me to perform.If this is not the test plss repeat the test.
LVL 27

Expert Comment

ID: 11003336
That is the Test,
Now we know the problem is NOT from your IExplorer encoding, but it is the way you export your data from your mdb.

lets try this way to export to a text file:

Open "C:\DeleteMe.rtf" For Output As #1    ' Open file for output.
Print #1, [AnyFieldName1]                     ' Print text to file.
Print #1, [AnyFieldName2]                     ' Print text to file.
Close #1

AnyFieldName1 is a Name of a field with your language data in it
AnyFieldName1 is a Name of another field with your language data in it

Then open the file and see if you can read the field value.


Author Comment

ID: 11029907
hi jaffer,
    I have tried to export as u said .Then I got only (?) marks in the text file.
    If i place the unicode hexadecimal eauivalent values of the local language chaarcters in MS-Access then i am getting the display of local language on the browser.
   but if directly place local language data , then I am getting (?) marks.
LVL 27

Expert Comment

ID: 11031061
Now you know where your problem IS.
It is the Export from Access.
Now you know that you have to Export with the unicode hexadecimal equivalent values of the local language charcters from Access to JSP (I will use html extension for my example so that you can view it in IExplorer)

Make a Code to convert your Field from Access to the unicode hexadecimal equivalent values of the local language charcters:

I am going to show you a sample of what you should do, as I don't know the hexadecimal equivalent of your characters.

I will Assume you have 2 Fields, txtData1 and txtData2 which contains the Data required to transfer to html,

You have 2 ways to do this,
1- Make another Fields for these hexadecimal eauivalent OR better, make a Table for them.
2- Export the Fileds to gether to an html file.

I will use the 2nd way as it involves more work, but you can use way 1 and take from the code what is required to convert to hexadecimal eauivalent.

This should be in your Form, maybe of a click of command button:

[AllData]=[txtData1] & [txtData2]   'we put together the fields together in 1 field
MyLanguage=ConvertLanguage([AllData])    'We are calling a Function called ConvertLanguage and sending the field [AllData] to it.

This Function will be saved in the module.
We will take each character from [AllData] and convert that character to hexadecimal equivalent values of the local language charcters, then combine these converted values and send this to html file.

Save the code below to a module, call it JSPCharacterSet

Function ConvertLanguage(OldData)

    Dim MyChar,  NewCharacters, i,OldData
    Open "C:\TestFiel.html" For Output As #2    ' Save file.
    NewCharacters= ""

        For i = 1 To Len(OldData)
            MyChar = Mid(OldData, i, 1) 'Read 1 character at a time of the field

    If MyChar = "`" Then MyChar = "ذ"   'OR If MyChar = "`" Then MyChar = Hex(10)
    If MyChar = "q" Then MyChar = "ض"
    If MyChar = "w" Then MyChar = "ص"  ' Convert each character in the field from Normal to Hex
    If MyChar = "e" Then MyChar = "ث"
    If MyChar = "r" Then MyChar = "ق"
    If MyChar = "t" Then MyChar = "ف"
    If MyChar = "y" Then MyChar = "غ"
    If MyChar = "u" Then MyChar = "ع"
    If MyChar = "i" Then MyChar = "ه"
    If MyChar = "o" Then MyChar = "خ"
    If MyChar = "p" Then MyChar = "ح"
    If MyChar = "[" Then MyChar = "ج"
    If MyChar = "]" Then MyChar = "د"
    If MyChar = "a" Then MyChar = "ش"
    If MyChar = "s" Then MyChar = "س"
    If MyChar = "d" Then MyChar = "ي"
    If MyChar = "f" Then MyChar = "ب"
    If MyChar = "g" Then MyChar = "ل"
    If MyChar = "h" Then MyChar = "ا"
    If MyChar = "j" Then MyChar = "ت"
    If MyChar = "k" Then MyChar = "ن"
    If MyChar = "l" Then MyChar = "م"
    If MyChar = ";" Then MyChar = "ك"
    If MyChar = "'" Then MyChar = "ط"
    If MyChar = "z" Then MyChar = "ئ"
    If MyChar = "x" Then MyChar = "ء"
    If MyChar = "c" Then MyChar = "ؤ"
    If MyChar = "v" Then MyChar = "ر"
    If MyChar = "b" Then MyChar = "لا"
    If MyChar = "n" Then MyChar = "ى"
    If MyChar = "m" Then MyChar = "ة"
    If MyChar = "," Then MyChar = "و"
    If MyChar = "." Then MyChar = "ز"
    If MyChar = "/" Then MyChar = "ظ"
            NewCharacters = NewCharacters & MyChar   'Add the converted Hex fields
        Next i

            Write #2, NewCharacters    'write the New Hex field to the File.
            NewCharacters= ""
    Close #2
End Function

This gives you the way to do your conversion from Access to your browser correctly.
You might have to fine tune the code to suite you.

I hope this helps you finish your project.


Author Comment

ID: 11047035
hello jaffer,
     My project is about storing values in databse dynamically & then later on retreiving them.U have suggested me to write the function where for each character hexadecimal equivalent is given.But how can I know what is the heaxadecimal equivalent for each character in telugu(my language).I have some 100s of characters.
    I even cant guess what the user will be entering the details.Is there any code so that I can convert the characters into hexadecimal.
    Actually I have some code which converts the characters into unicode but of different format i.e.
    \u0c32\u0c41      (format 1)
    this is equivalent to
   లు     (format 2)
   when i store in the databse with format 2 I am able to display the language data on browser.
   but when i store in format 1 I am getting unicode characters instead of language data( i.e. \uoc32\uoc41 instead of my lang data)
    I have amethod which converts lang data into format 1 but no method to convert from data to format 2.
    Please let me know what can i do now? pls..
       More over now I have changed to MS-access XP.
  Now when i export to text file then I am getting the lang data without (?) marks.
LVL 27

Accepted Solution

jjafferr earned 500 total points
ID: 11048174

I did a search on the internet to find some info on your language,
I selected www.thatstelugu.com/
once you click on it, it brings up a Security Alert to install a Cockie, from BitStream WebFont player,
Clicking on their name took me to their site http://www.bitstream.com/,
One of the Group companies have a Font Forum http://www.myfonts.com/FontForums/
Why don't you check it out, there might be there something for you.

Please see http://www.aksharamala.com/forums/archive/index.php/f-62.html
for conversions of fonts programatically.

check http://www.software-x.com/software/hindi.html
for more details about the same.

A bit more about your Character set http://www.eki.ee/letter/sources.html

For what I can do, I did a small code where I usually get my Ansi chacater set  from,
Here you can do your conversion and see your Hex value of the character, I assigned it to a field called Text0:

For i = 1 To Len([Text0])
    OneChar = Mid([Text0], i, 1)
    MsgBox OneChar & "-" & Asc(OneChar) & "-" & Hex(Asc(OneChar))
Next i

Investigate to see how you were able to get (format 2) and build a conversion code like what I showed you.

Sorry, but seems, this is where you have to go further in investigation.

Good Luck,

LVL 51

Expert Comment

by:Steve Bink
ID: 11957932
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:

Accept - jjafferr

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question