[try 2] [2/2] mlang: Add implementation offnIMLangFontLink_GetCharCodePages

Vitaly Perov vitperov at etersoft.ru
Sat Nov 1 08:22:00 CDT 2008


> I can't read your mind or guess what those "some extra bits" are. Why can't
> you mark the failing tests with todo_wine and think later how to make the
> tests pass?
>

This function must set only supported codepages bits
The supported codepages are: 
ttp://www.microsoft.com/globaldev/reference/WinCP.mspx

For example, we use a symbol from Latin1 codepage.
All codepages are include this symbol.
So if we use EnumSystemCodePage() it enumerates codepages from the cptables 
array. This array include all codepages. So when we use a symbol from Latin1, 
all bits are set (I've tested it long time ago, so maybe I'm mistaken, maybe 
1 bit or 2 are not set).
But only the following bits must be set:
FS_LATIN1 | FS_LATIN2 | FS_CYRILLIC | FS_GREEK | FS_TURKISH | FS_HEBREW | 
FS_ARABIC | FS_BALTIC | FS_VIETNAMESE | FS_THAI | FS_JISJAPAN | 
FS_CHINESESIMP | FS_WANSUNG | FS_CHINESETRAD

So, it's impossible to use EnumSystemCodePage()

If we use codepages from mlang_data[], everything works perfect.

The functions GetCPInfo/MultiByteToWideChar aren't also provide the list of 
needed codepages.

There is one extra problem:
I can't find the size of the dbcs_table->cp2uni array, so It needs to 
calculate it. This calculation works perfect, but maybe there is more easy 
way to obtain it?

-- 
Best wishes,
Vitaly Perov
Russia, Saint-Petersburg. www.etersoft.ru



More information about the wine-devel mailing list