Link to home
Start Free TrialLog in
Avatar of tigerSG
tigerSG

asked on

Convert Hex value of a Chinese word

Dear All,

I really need help from all the experts here on how to convert, eg. a double byte hexadecimal Chinese character, to a form of standard codes where I am able to save it to and view the Chinese character in my MS Access Database.

For example, a Chinese character "You", has such a code of "Äã". May I know what format is that? If I have a code of such : "884C", how can I convert it to the form of ,eg, "Äã"?

Please help.

Thanks.
Avatar of OhMyGod
OhMyGod

In VB,
u can use strconv() to convert it
like this:

Dim s As String
Dim t() As Byte
Dim I As Integer

s = "A?"

MsgBox s
t = StrConv(s, vbFromUnicode)
For I = LBound(t) To UBound(t)
MsgBox "&#" & t(I)
Next
Avatar of Michel Sakr
this is unicode.. your can store it this way in your db but when you want to show on the site simply put an content type meta in your header.. no need to Hex or else.. and a codepage.. you should know the code of your character set..

'the below will show unicoded arabic
<%@Language=VBScript Codepage=1256%>
<html>
<head>
<META content="text/html; charset=windows-1256" http-equiv=Content-Type>
</head>
<body>...
ASKER CERTIFIED SOLUTION
Avatar of benyip020499
benyip020499

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tigerSG

ASKER

Hi,

Is there any funcion in Visual Basic that I can use to convert a string of unicode to Chineses Character in Win 2000 Server Chinese OS.

Anyone can Help.

Thanks.