version 0.3.25
[fms.git] / include / unicode / utfconversion.h
1 #ifndef _UTF_conversion_\r
2 #define _UTF_conversion_\r
3 \r
4 /*\r
5         Thanks to http://www.codeproject.com/KB/string/UtfConverter.aspx for the basic idea\r
6         http://www.unicode.org/Public/PROGRAMS/CVTUTF/\r
7 */\r
8 \r
9 #include <string>\r
10 #include <vector>\r
11 \r
12 #include "ConvertUTF.h"\r
13 \r
14 namespace UTFConversion\r
15 {\r
16 \r
17 // UTF-8 byte sequence to UTF-16 or UTF-32, depending on size of wchar_t\r
18 const bool FromUTF8(const std::vector<char> &utf8string, std::wstring &wcstring);\r
19 const bool FromUTF8(const std::string &utf8string, std::wstring &wcstring);\r
20 // UTF-16 or UTF-32 to UTF-8 byte sequence\r
21 const bool ToUTF8(const std::wstring &wcstring, std::string &utf8string);\r
22 \r
23 }       // namespace\r
24 \r
25 #endif  // _UTF_conversion_\r