[PATCH 1/2] ntdll: Add RtlLCIDToCultureName.

Alexandre Julliard julliard at winehq.org
Thu Apr 8 12:24:17 CDT 2021


Mark Harmstone <mark at harmstone.com> writes:

> On 8/4/21 6:04 pm, Alexandre Julliard wrote:
>> You could probably reuse the existing helper. This would need some tests
>> about the behavior on short buffers.
>
> Why? UNICODE_STRINGs don't need to be null-terminated.

No but they can be. Like I said this would need tests.

>>> +    /* kernel32 doesn't store information about primary languages */
>> LOCALE_SPARENT seems pretty close.
>
> Yes, but that's still indexed by lang-sublang pair. You'd have to loop
> through every language, which seems overkill just to avoid a bit of
> code duplication. And you run into the problem where LANG_CROATIAN ==
> LANG_SERBIAN, but they still have separate strings.

Using the existing data is not overkill. We can't have every language
function have its own language table. It doesn't matter if the results
are not 100% identical to Windows, what's important is that they are
coherent across locale functions.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list