On 20/12/20 8:13 am, toybox-requ...@lists.landley.net wrote:
Message: 1
Date: Sat, 19 Dec 2020 04:42:07 -0600
From: Rob Landley <r...@landley.net>
To: enh <e...@google.com>
Cc: toybox <toybox@lists.landley.net>
Subject: Re: [Toybox] [PATCH] main.c: fix UTF-8 on macOS.
Message-ID: <ab4d113f-e37e-1cee-7cd6-3f9e31211...@landley.net>
Content-Type: text/plain; charset=utf-8

On 12/14/20 11:13 PM, enh wrote:
On Mon, Dec 14, 2020 at 8:54 PM Rob Landley wrote:

    On 12/14/20 7:33 PM, enh via Toybox wrote:
    > Unfortunately neither "C.UTF-8" nor "UTF-8" works on *both* OSes...

    Tempted to newlocale() and uselocale() to edit utf8 support into "C" 
myself, but
    that's even LESS likely to work on macos, isn't it?

    Rob
actually, the attached patch (on top of the one you already committed) doing
exactly that does work for me on macOS. (untested on Linux though!)
What's xlocale.h? It's not in posix and musl hasn't got it.

?part of gnu c library, most distributions usually seem to be just link it from locale.h, however a real version can be found at

https://sites.uclouvain.be/SystInfo/usr/include/xlocale.h.html

however i can't say it's the latest as this one is 2011.

EDIT: apparently it was supposedly removed and your suppose to use locale.h instead.

https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html <https://sourceware.org/ml/libc-alpha/2017-08/msg00010.html>

The nonstandard header <xlocale.h> has been removed. Most programs should
use <locale.h> instead. If you have a specific need for the definition of
locale_t with no other declarations, please contact
libc-al...@sourceware.org <mailto:libc-al...@sourceware.org> and explain.


scsijon


Rob
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to