gdi32: Fix the GdiGetCodePage() support ANSI_CHARSET font associated charset.

Akihiro Sagawa sagawa.aki at gmail.com
Fri Feb 22 10:22:49 CST 2013


On Fri, 22 Feb 2013 11:21:20 +0900, Byeongsik Jeon wrote:
> This patch fix a original topic of the wine-bugs #16325.

Thanks for your work on this.

> +static DWORD get_associated_charset_info(void)
> +{
> +    static DWORD associated_charset = -1;
> +
> +    if (associated_charset == -1)
> +    {
> +        const char *assoc_charset_reg_key =
> +            "System\\CurrentControlSet\\Control\\FontAssoc\\Associated Charset";

Please use WCHARs and W version of APIs in gdi32/font.c, like:
const WCHAR yesW[] = { 'Y', 'E', 'S', 0 }; and so on.

> @@ -3615,6 +3615,33 @@ static void update_font_info(void)
>      }
>      if (!done)
>          FIXME("there is no font defaults for codepages %u,%u\n", ansi_cp, oem_cp);
> +
> +    if (RegCreateKeyA( HKEY_LOCAL_MACHINE,
> +                       "System\\CurrentControlSet\\Control\\FontAssoc\\Associated Charset",

As far as I know, in SBCS locale, this key doesn't exist. Therefore it
should delete in SBCS locale initialization and create the key in DBCS
locale initialization.

Regards,
Akihiro Sagawa




More information about the wine-devel mailing list