From e8225fad602e333166ca32f238b819de44435565 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Tue, 12 Apr 2016 22:42:26 +0800 Subject: [PATCH] missing conversion for non-Windows platform --- source/charset.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/charset.cpp b/source/charset.cpp index 42fc386a..225cba40 100644 --- a/source/charset.cpp +++ b/source/charset.cpp @@ -1162,12 +1162,21 @@ namespace nana { switch(encoding) { +#if defined(NANA_WINDOWS) case unicode::utf8: return utf16_to_utf8(wcstr); case unicode::utf32: return utf16_to_utf32(wcstr); case unicode::utf16: return wcstr; +#else //POSIX + case unicode::utf8: + return utf32_to_utf8(wcstr); + case unicode::utf16: + return utf32_to_utf16(wcstr); + case unicode::utf32: + return wcstr; +#endif } } return {};