YAMAMOTO Takashi
2010-06-04 00:35:11 UTC
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
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