diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/locale_convert.cc | 9 | ||||
| -rw-r--r-- | src/locale_convert.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/locale_convert.cc b/src/locale_convert.cc index ca6f6552..fc156244 100644 --- a/src/locale_convert.cc +++ b/src/locale_convert.cc @@ -36,6 +36,7 @@ #include <inttypes.h> using std::string; +using std::wstring; template<> string @@ -152,6 +153,14 @@ dcp::locale_convert (char const * x, int, bool) template<> string +dcp::locale_convert (wchar_t const * x, int, bool) +{ + wstring s (x); + return string (s.begin(), s.end()); +} + +template<> +string dcp::locale_convert (char x, int, bool) { string s; diff --git a/src/locale_convert.h b/src/locale_convert.h index 4c977846..760e1068 100644 --- a/src/locale_convert.h +++ b/src/locale_convert.h @@ -97,6 +97,10 @@ locale_convert (char const * x, int, bool); template <> std::string +locale_convert (wchar_t const * x, int, bool); + +template <> +std::string locale_convert (char x, int, bool); template <> |
