aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbString.hh
diff options
context:
space:
mode:
authorsimonb <simonb>2006-06-25 09:05:58 (GMT)
committersimonb <simonb>2006-06-25 09:05:58 (GMT)
commit80389b5dd5e7be4025cafbb2e7b055fd06f4f56d (patch)
tree1406d6c5044958bc40f2b7f4f8326ca8cc01629f /src/FbTk/FbString.hh
parent577859034db0e0e36ceab85ebba62e1018dd3361 (diff)
downloadfluxbox-80389b5dd5e7be4025cafbb2e7b055fd06f4f56d.zip
fluxbox-80389b5dd5e7be4025cafbb2e7b055fd06f4f56d.tar.bz2
support encodings in menu files
Diffstat (limited to 'src/FbTk/FbString.hh')
-rw-r--r--src/FbTk/FbString.hh20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/FbTk/FbString.hh b/src/FbTk/FbString.hh
index 011d47a..cfa44d9 100644
--- a/src/FbTk/FbString.hh
+++ b/src/FbTk/FbString.hh
@@ -52,6 +52,26 @@ std::string FbStrToLocale(const FbString &src);
52bool haveUTF8(); 52bool haveUTF8();
53 53
54} // namespace FbStringUtil 54} // namespace FbStringUtil
55
56class StringConvertor {
57public:
58
59 enum EncodingTarget { ToFbString, ToLocaleStr };
60
61 StringConvertor(EncodingTarget target);
62 ~StringConvertor();
63
64 bool setSource(const std::string &encoding);
65 void reset() { m_iconv = ((iconv_t)(-1)); }
66
67 std::string recode(const std::string &src);
68
69private:
70 iconv_t m_iconv;
71
72 std::string m_destencoding;
73};
74
55} // namespace FbTk 75} // namespace FbTk
56 76
57#endif // FBTK_FBSTRING_HH 77#endif // FBTK_FBSTRING_HH