YAMAMOTO Takashi | 4 Jun 2010 02:35
Picon

pretty-printing of foreign wchar_t

hi,

if i wanted to pretty-print foreign wchar_t, i'd do:

1. if the encoding of it is known and supported by the local iconv
  implementation, try to iconv it to nl_langinfo(CODESET) and printf.
  (assuming that nl_langinfo(CODESET) is a valid iconv codeset name.
  it works for netbsd, but unfortunately is not portable, iirc.)

2. otherwise, simply print it as a byte stream.

YAMAMOTO Takashi


Gmane