1

According to: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/xlocale.3.html

xlocale.h provides extended locale support by allowing per-thread locale setups in C.

Additionally, alongside wchar.h provides flexible functions to convert unicode to other encodings, such as wprintf_l which outputs unicode characters converted to a specified locale (not the one set globally by setlocale).

It is surely present in OS X and, recently, on FreeBSD(>9.1) platforms, but it does not seen to be officially supported in any other.

  • it's an apple api, so it'll only be present in apple devices, unless they decide to get put into a standard available for general use. – Marc B Jan 19 '14 at 07:21
  • Officially, that seems to be the case. However, I think that some implementations of this API may already have been ported to other platforms. For instance, it is present in freeBSD since version 9.1 according to this man page link [link](http://www.freebsd.org/cgi/man.cgi?query=xlocale&sektion=3). Xlocale is very useful for handling and streaming unicode/wchar from/to various encodings. It is also conceptually more flexible than dedicated unicode libs such as iconv or ICU. Maybe there are others(unofficial) implementations of the API for other platforms, that is exactly what I'm looking for. – Filipi Nascimento Silva Jan 20 '14 at 06:29
  • FYI glibc: https://sourceware.org/bugzilla/show_bug.cgi?id=10891 (2000 document) – Steven R. Loomis Aug 30 '16 at 23:36

0 Answers0