Peter Fay
2005-12-13 08:58:19 UTC
MultibyteToWideChar appears to give incorrect results under WinXP for
cyryllic codepage (866).
This is the same whether I use Michael Kaplan's AToW function or pass byte
Arrays directly to MultibyteToWideChar.
The snippet below uses unadulterated codepage.bas by Michael Kaplan.
Any pointers to where I am going astray?
Peter J Fay
##########################################################
Dim T As String
Dim i As Integer
Dim msg As String
'Cyryllic code page = 866
'Upper case Cyryllic Be in this character set =193
'lower case Cyryllic Be in this character set (215)
For i = 192 To 255
T = AToW(Chr(i), 866)
Debug.Print i & vbTab & Hex(AscW(T))
Next
'This returns 2534 (hexadecimal) for Upper case Cyryllic Be in this
character set (193)
'The correct unicode for this character is 441(hexadecimal)
'This returns 441 (hexadecimal) for lower case Cyryllic Be in this character
set (215)
'The correct unicode for this character is 431(hexadecimal)
cyryllic codepage (866).
This is the same whether I use Michael Kaplan's AToW function or pass byte
Arrays directly to MultibyteToWideChar.
The snippet below uses unadulterated codepage.bas by Michael Kaplan.
Any pointers to where I am going astray?
Peter J Fay
##########################################################
Dim T As String
Dim i As Integer
Dim msg As String
'Cyryllic code page = 866
'Upper case Cyryllic Be in this character set =193
'lower case Cyryllic Be in this character set (215)
For i = 192 To 255
T = AToW(Chr(i), 866)
Debug.Print i & vbTab & Hex(AscW(T))
Next
'This returns 2534 (hexadecimal) for Upper case Cyryllic Be in this
character set (193)
'The correct unicode for this character is 441(hexadecimal)
'This returns 441 (hexadecimal) for lower case Cyryllic Be in this character
set (215)
'The correct unicode for this character is 431(hexadecimal)