|
|
Message-ID: <20151118162418.GN3818@brightrain.aerifal.cx>
Date: Wed, 18 Nov 2015 11:24:18 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: musl and legacy win32 apps through wine
On Wed, Nov 18, 2015 at 01:32:44PM +0700, Рысь wrote:
> I managed to get it work easily - the fact that Wine does all encoding
> by it's own powers happily eases the task, and drafts to using the
> simple LD_PRELOAD hack:
>
> % cat libbrklocale.c
> #include <locale.h>
> #include <string.h>
>
> char d[64];
>
> char *setlocale(int cat, const char *locale)
> {
> char *p = d;
>
> strcpy(d, "ru_RU.UTF-8");
> return p;
> }
>
> % cc -shared -fPIC libbrklocale.c -o libbrklocale.so
> % LD_PRELOAD=./libbrklocale.so wine prog1251.exe
>
> I can hardcore it into Wine itself by calling appropriate setlocale
> from somewhere, but it's easier to use it as is since my Wine setup is
> going into separate chroot directory.
>
> The problem was discovered with Wine debugging facility, it got mixed
> locale with mixed "C" and "ru_RU.UTF-8" for
> LC_ALL/LC_MESSAGES/LC_CTYPE. It used latter for encoding, and text was
> garbled. Now everything is consistent and works flawlessly.
Are you perhaps using an older version of musl? Recent versions should
report the locale you requested for all categories, not a mix of C and
your requested locale.
Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.