Creating the Sinhala NLS file

Isira Seneviratne isirasen96 at gmail.com
Thu Feb 28 20:51:12 CST 2019


On Fri, Mar 1, 2019 at 4:00 AM Isira Seneviratne <isirasen96 at gmail.com>
wrote:

>
>
> On Thu, 28 Feb 2019, 10:46 pm Alex Henrie, <alexhenrie24 at gmail.com> wrote:
>
>> On Wed, Feb 27, 2019 at 11:22 PM Isira Seneviratne <isirasen96 at gmail.com>
>> wrote:
>> > I would like to know if the following statements to obtain the value of
>> LOCALE_FONTSIGNATURE for Sinhala are correct, or if any corrections should
>> be made:
>> >
>> > WCHAR s[100];
>> > GetLocaleInfoEx(L"si", LOCALE_FONTSIGNATURE, s, 100);
>>
>> To be sure you're getting the correct value, I would use
>> LOCALE_NAME_SYSTEM_DEFAULT and run the code on a Windows machine that
>> was set up in the Sinhala language from the beginning.
>>
>
> Okay, thank you.
>
>
>> > +  LOCALE_SSCRIPTS "Taml;"
>>
>> Are you sure this is right?
>>
>
> I wasn't able to get a proper value for that yet, so I didn't change it.
> I'll add the remaining values.
>
> I sent the patch so that I could get feedback on it.
>
>
>> -Alex
>>
>
I used the following source code to retrieve the LOCALE_FONTSIGNATURE value
and print it to a text file (I used GetLocaleInfoA because MinGW was
returning an error saying that GetLocaleInfoEx could not be found):

#include <windows.h>
#include <winnls.h>
#include <fstream>

using namespace std;

int main()
{
    ofstream ofs ("locale.txt", std::ofstream::out);
    char s[100];
    GetLocaleInfoA(MAKELCID(MAKELANGID(LANG_SINHALESE,
SUBLANG_SINHALESE_SRI_LANKA), SORT_DEFAULT), LOCALE_FONTSIGNATURE, s, 100);
    ofs << s << endl;
    ofs.close();
}

I then used hexdump to get the following from the output file:

0000000 0a0d
0000002

How should this be converted to the format used in the NLS files?

Isira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190301/1a1c451a/attachment.html>


More information about the wine-devel mailing list