Korean characters appearing as ???? characters


I have asked this question before with no success so i will try again..

What is the bottom line on pulling Korean characters out of a SQL server 2000 DB using ADO (VB6) and displaying the characters successfully on an ASP page.  When I loop through my recordset all my korean characters show as ????? characters

I have installed language packs for Korean but no success...

I have read numerous articles on unicode but got lost in the masses of information.  Can anyone tell me simply if there is a solution or not?

I feel that VB6 is not handling the characters - so what can I do?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Stephen MandersonSoftware EngineerCommented:
Hi there, think you need an addin, hope ths link sorts your problem.

Stephen MandersonSoftware EngineerCommented:
This will allow you to use korean languages in Visual Basic.
cgibbons123Author Commented:
Thanks but I am not sure this is what I am looking for!

Maybe some more info....

I am using VB6 as a com component to solely get recordsets from the SQL Server - I call the COM object from my ASP page.  

I cant see how the above tool works in this case??  Maybe I am missing something but it looks like this tool covers more the controls within VB?

If I debug.print a field in my VB recordset i still get ??? characters..

can you advise a little more please?

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Stephen MandersonSoftware EngineerCommented:
At what poing in the vb stage do you get the characters coming up as "?????" ? Sounds like its a problem when they get stored into the SQL Database

This link here deals with asp converstion.
All strings in VB are Unicode strings, so that should not be an issue.  You can test this by putting a test method in your DLL which simply returns a local Unicode string (not from the database) which contains Korean characters.  I do not think you can use Debug.Print because the immediate window does not support Unicode (unless perhaps you have the Korean version of VB).

I think that SQL needs to be setup to store Unicode text in order to use the nchar, nvarchar, and ntext Unicode data types.  This may not be an issue because if you are getting ?????? in the debug window, then it's a sign that you have unicode data.

Also make sure you set the web page to charset=UTF-8
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
cgibbons123Author Commented:
The Korean characters look fine in the SQL database

When I get the recordset in VB and loop through the recordset for example and do a debug.print all the characters are changed to "???"

The only *free* controls I know of which are able to display Unicode strings for testing are the Forms 2 controls shipped with MS Office.  You can add a Forms 2 textbox to a form and set its font to a Korean unicode font.  Then you can test your strings in that textbox.

Project->Components->"Microsoft Forms 2.0 Object Library"  (Must have Office installed to have this)
cgibbons123Author Commented:
Thanks Erick

Here where I am so far:

Using the Forms 2 control I can see Korean characters within VB6.
However within my asp page I still get the ??? characters even with the line
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Is there any special instructions on where to put that line?? Or is there something else?  

I actually wanted to feed my recordset into a Crystal report embedded on ASP but that is entirely a new can of worms...
If I could show the Korean charachters on ASP I would be semi-happy!

Well I do not have ASP on this machine so I cannot test anything in ASP, but I can write Unicode to a browser without difficulty and it displays the characters correctly in the browser.  I tried charset=ks_c_5601-1987 which the Korean sites seem to use, and UTF-8, and both work.

Dim sHTML As String
Dim ie As New InternetExplorer 'Add a reference to Microsoft Internet Controls

ie.Visible = True
ie.Navigate2 "about:blank"
Do While ie.ReadyState <> READYSTATE_COMPLETE: DoEvents: Loop

'<META HTTP-EQUIV="Content-Type" Content="text/html; charset=ks_c_5601-1987">

sHTML = "<meta http-equiv=" & Chr(34) & "Content-Type" & Chr(34) & _
        "content=" & Chr(34) & "text/html; charset=utf-8" & Chr(34) & ">"
sHTML = sHTML & TextBox1.Text '<<--the unicode text
sHTML = sHTML & "</BODY></HTML>"

ie.Document.Write sHTML

The browser displays this correctly (View->Encoding->Auto Select)
Here is some more info:

INF: Storing UTF-8 Data in SQL Server

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cgibbons123Author Commented:
Hi Erick

I successfully displayed korean characters on an asp page which is what I asked you for!  Thank you

Ultimately I wanted to display the korean characters in a Crystal report embedded in ASP and I am still no closer - i still get the ???.  i have gone full runaround between thinking it was a crystal issue to a vb issue back to a crystal issue.

thanks for your help..

Ps if you have any ideas on how I could make the characters appear in Crystal I would be grateful...
currently i am playing with
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.