?
Solved

Korean characters appearing as ???? characters

Posted on 2004-11-17
11
Medium Priority
?
909 Views
Last Modified: 2013-12-03
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?
0
Comment
Question by:cgibbons123
  • 4
  • 4
  • 3
11 Comments
 
LVL 19

Expert Comment

by:Stephen Manderson
ID: 12610079
Hi there, think you need an addin, hope ths link sorts your problem.

http://www.lencom.com/desc/indexN18436.html
0
 
LVL 19

Expert Comment

by:Stephen Manderson
ID: 12610110
This will allow you to use korean languages in Visual Basic.
0
 

Author Comment

by:cgibbons123
ID: 12610329
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?

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:Stephen Manderson
ID: 12610426
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
0
 
LVL 32

Expert Comment

by:Erick37
ID: 12610510
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">
0
 

Author Comment

by:cgibbons123
ID: 12610512
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 "???"

0
 
LVL 32

Expert Comment

by:Erick37
ID: 12610594
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)
0
 

Author Comment

by:cgibbons123
ID: 12610674
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!



0
 
LVL 32

Expert Comment

by:Erick37
ID: 12610913
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></HEAD><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)
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 2000 total points
ID: 12611082
Here is some more info:

INF: Storing UTF-8 Data in SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;232580
0
 

Author Comment

by:cgibbons123
ID: 12611172
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
0

Featured Post

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.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

850 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