Andrew O. Shadoura wrote:
break; }
- if (flags & MB_USEGLYPHCHARS) {
for (i=0; i!=dstlen; i++)
if (dst[i]<0x20) dst[i]=glyph_xlat[dst[i]];
- }
I think you need to take into account the codepage when doing this translation.
"Robert Shearman" rob@codeweavers.com wrote:
Andrew O. Shadoura wrote:
break; }
- if (flags & MB_USEGLYPHCHARS) {
for (i=0; i!=dstlen; i++)
if (dst[i]<0x20) dst[i]=glyph_xlat[dst[i]];
- }
I think you need to take into account the codepage when doing this translation.
Also probably this code needs to go to libs/wine/mbtowc.c, and the test at least for 1252 and say 1251 code pages wouldn't hurt.
Hello, Robert!
Monday, March 12, 2007, 18:02:59, you wrote:
RS> Andrew O. Shadoura wrote:
break; }
- if (flags & MB_USEGLYPHCHARS) {
for (i=0; i!=dstlen; i++)
if (dst[i]<0x20) dst[i]=glyph_xlat[dst[i]];
- }
RS> I think you need to take into account the codepage when doing this RS> translation.
I think not. MSDN says:
1. The MultiByteToWideChar function maps a character string to a wide-character (Unicode) string. The character string mapped by this function is not necessarily from a multibyte character set.
2. MB_USEGLYPHCHARS Use glyph characters instead of control characters. 'control characters' in this context are _Unicode_ characters below U+0020. dst is a pointer to WCHAR string - this means it is Unicode string. So, we don't need to take into account any codepages, because codepage of dst is Unicode
-- WBR, Andrew O. Shadoura
--- PolySoft Station * Origin: Is AVR inside? (2:4500/1.25)
Andrew O. Shadoura wrote:
MB_USEGLYPHCHARS Use glyph characters instead of control characters. 'control characters' in this context are _Unicode_ characters below U+0020. dst is a pointer to WCHAR string - this means it is Unicode string. So, we don't need to take into account any codepages, because codepage of dst is Unicode
Yes, you're right. However, like Dmitry said, I think this should be implemented in the in libs/wine instead of MultiByteToWideChar.
Hello, Robert!
Tuesday, March 13, 2007, 16:35:49, you wrote:
RS> Andrew O. Shadoura wrote:
MB_USEGLYPHCHARS Use glyph characters instead of control characters. 'control characters' in this context are _Unicode_ characters below U+0020. dst is a pointer to WCHAR string - this means it is Unicode string. So, we don't need to take into account any codepages, because codepage of dst is Unicode
RS> Yes, you're right. However, like Dmitry said, I think this should be RS> implemented in the in libs/wine instead of MultiByteToWideChar.
Excuse me for late answer :) I think this can be left in MultiByteToWideChar, because this parameter only affects output of this function, and there's no need to include it into libs/wine/mbtowc.c. And one more thing is that we need to copy these three lines
-- WBR, Andrew O. Shadoura
--- PolySoft Station * Origin: Programming in progress... (2:4500/1.25)
Hello, Robert!
Tuesday, March 13, 2007, 16:35:49, you wrote:
RS> Andrew O. Shadoura wrote:
MB_USEGLYPHCHARS Use glyph characters instead of control characters. 'control characters' in this context are _Unicode_ characters below U+0020. dst is a pointer to WCHAR string - this means it is Unicode string. So, we don't need to take into account any codepages, because codepage of dst is Unicode
RS> Yes, you're right. However, like Dmitry said, I think this should be RS> implemented in the in libs/wine instead of MultiByteToWideChar.
Excuse me for late answer :) I think this can be left in MultiByteToWideChar, because this parameter only affects output of this function, and there's no need to include it into libs/wine/mbtowc.c. And one more thing is that we need to copy these three lines into wine_cpsymbol_mbstowcs, wine_cp_mbstowcs and wine_utf8_mbstowcs. So, I think, it'd be better to leave this code in MultiByteToWideChar.
P.S. What should I do for my patch to be added into WINE?
-- WBR, Andrew O. Shadoura
--- PolySoft Station * Origin: Programming in progress... (2:4500/1.25)
Andrew O. Shadoura bugzilla@tut.by writes:
- MB_USEGLYPHCHARS Use glyph characters instead of control characters.
'control characters' in this context are _Unicode_ characters below U+0020. dst is a pointer to WCHAR string - this means it is Unicode string. So, we don't need to take into account any codepages, because codepage of dst is Unicode
Yes, but apparently this is only supposed to do something for OEM codepages, so you'd still have to take that into account. Writing some test cases is probably a good idea.