How does KeyAscii behave under MBCS?

I can't seem to find any online resources about this.  I'm doing Japanese localisation under VB6, and I want to know how the following code behaves when running under a Japanese locale:

Private Sub txtXxxx_KeyPress(Index As Integer, KeyAscii As Integer)
End Sub

Does the KeyAscii value come in as Unicode corresponding to the character pressed in the local language?  Or is it more complicated than that?

If it IS Unicode, what happens for values inthe range x8000-xFFFF?  Is there any problem with signed Integers?
mtorrAsked:
Who is Participating?
 
ee_ai_constructCommented:
PAQed, with points refunded (250)

ee_ai_construct
Community Support Moderator
0
 
diarmaidCommented:

You could create a small vb project and set a breakpoint inside the keypress event and examine the KeyAscii value...
0
 
mtorrAuthor Commented:
I could, if I had access to a Japanese keyboard and knew what the Unicode values were... however, I don't.  I was really looking for a more theoretical answer!
0
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.

 
Richie_SimonettiIT OperationsCommented:
0
 
mtorrAuthor Commented:
Thanks - that was quite instructive about Unicode in general, but it didn't mention KeyAscii...
0
 
Richie_SimonettiIT OperationsCommented:
0
 
mtorrAuthor Commented:
I need to know about KeyAscii, which is an argument to the TextBox control's KeyPress event.  I already know about the usual VB string functions.  Neither of your suggested links covers this.
0
 
Richie_SimonettiIT OperationsCommented:
OK. Good luck then.
0
 
diarmaidCommented:
My only other (last ditch) suggestion would be to check the Unicode values at http://www.unicode.org/charts/
0
 
EDDYKTCommented:
To bad we don't have Japanese or chinese in our machine.

However since the
KeyAscii As Integer

I believe everything should be return as one

I guess
0
 
mtorrAuthor Commented:
Thanks for the link to the Unicode charts, diarmaid.  It has at least confirmed that Japanese characters seem to be in the range 3000-3FFF, so signed integers should not be a problem.

I still need to know how KeyAscii behaves with a Japanese OS/keyboard.  Somebody out there must know this, I'm sure!
0
 
DanRollinsCommented:
mtorr, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

Dan Rollins -- EE database cleanup volunteer
0
 
diarmaidCommented:
agreed
0
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.

All Courses

From novice to tech pro — start learning today.