<div dir="ltr">from bionic's xlocale.h:<div><br></div><div>/**<br> * @file xlocale.h<br> * @brief `locale_t` definition.<br> *<br> * Most users will want `<locale.h>` instead. `<xlocale.h>` is used by the C<br> * library itself to export the `locale_t` type without exporting the<br> * `<locale.h>` functions in other headers that export locale-sensitive<br> * functions (such as `<string.h>`).<br> */<br></div><div><br></div><div>except macOS insists on keeping newlocale(3) there, despite POSIX.</div><div><br></div><div>new patch attached, which moves the #include to portability.h and adds a comment...</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 19, 2020 at 2:30 AM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 12/14/20 11:13 PM, enh wrote:<br>
> On Mon, Dec 14, 2020 at 8:54 PM Rob Landley wrote:<br>
> <br>
> > On 12/14/20 7:33 PM, enh via Toybox wrote:<br>
> > > Unfortunately neither "C.UTF-8" nor "UTF-8" works on *both* OSes...<br>
> ><br>
> > Tempted to newlocale() and uselocale() to edit utf8 support into "C" myself, but<br>
> > that's even LESS likely to work on macos, isn't it?<br>
> ><br>
> > Rob<br>
>> actually, the attached patch (on top of the one you already committed) doing<br>
> exactly that does work for me on macOS. (untested on Linux though!)<br>
<br>
What's xlocale.h? It's not in posix and musl hasn't got it.<br>
<br>
Rob<br>
</blockquote></div>