cgibbons123
asked on
Korean characters appearing as ???? characters
Hello
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?
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?
This will allow you to use korean languages in Visual Basic.
ASKER
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?
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?
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.
http://www.chilkatsoft.com/euc_cn.asp#aspExample
This link here deals with asp converstion.
http://www.chilkatsoft.com/euc_cn.asp#aspExample
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">
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">
ASKER
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 "???"
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->"Micr osoft Forms 2.0 Object Library" (Must have Office installed to have this)
Project->Components->"Micr
ASKER
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!
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 & "<HTML><HEAD><TITLE>Test</ TITLE></HE AD><BODY>"
sHTML = sHTML & TextBox1.Text '<<--the unicode text
sHTML = sHTML & "</BODY></HTML>"
ie.Document.Open
ie.Document.Write sHTML
ie.Document.Close
The browser displays this correctly (View->Encoding->Auto Select)
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 & "<HTML><HEAD><TITLE>Test</
sHTML = sHTML & TextBox1.Text '<<--the unicode text
sHTML = sHTML & "</BODY></HTML>"
ie.Document.Open
ie.Document.Write sHTML
ie.Document.Close
The browser displays this correctly (View->Encoding->Auto Select)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
http://support.businessobjects.com/library/kbase/articles/c2008349.asp
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
http://support.businessobjects.com/library/kbase/articles/c2008349.asp
http://www.lencom.com/desc/indexN18436.html