XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Phil Shafer
phil at juniper.net
Thu Jul 31 21:41:13 UTC 2014
John-Mark Gurney writes:
>Well, from my understanding there can't be a "locale" that is UTF-8
>as a locale contains more than just character encoding... It also
>includes month/day names, sorting, etc... I think you can get a
>C locale (the default) w/ UTF-8 by setting the correct environment
>variables, but I don't know them well enough to say... Should we add
>a locale that does this? There is UTF-8 in /usr/share/locale, but if
>you set LANG to it, things don't work..
I'll change the library to follow the settings of the user's env var
and assuming they've set it correctly, all will work well. Since
libxo uses vsnprintf under the covers, all this should work fine.
(void)wcsftime(buf, sizeof(buf), fmt, &tp);
...
xo_emit("{:login-time/%ls}", buf);
Or something like that......
Thanks,
Phil
More information about the freebsd-arch
mailing list