summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/FbTk/FbString.cc11
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index a48ff34..d502ccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 0.9.16: 2Changes for 0.9.16:
3*06/06/10: 3*06/06/10:
4 * Fix building on machines without iconv [sf.net #1499402] (Simon)
5 FbTk/FbString.cc
4 * Fix some external tab alignment on shade (Simon) 6 * Fix some external tab alignment on shade (Simon)
5 FbWinFrame.cc 7 FbWinFrame.cc
6 * Fix container size rounding for right alignment (Simon) 8 * Fix container size rounding for right alignment (Simon)
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc
index 26eb058..7a0ef1b 100644
--- a/src/FbTk/FbString.cc
+++ b/src/FbTk/FbString.cc
@@ -56,14 +56,14 @@ static int iconv_convs[CONVSIZE];
56 56
57/// Initialise all of the iconv conversion descriptors 57/// Initialise all of the iconv conversion descriptors
58void init() { 58void init() {
59 setlocale(LC_CTYPE, "");
60
61#ifdef HAVE_ICONV
59 if (iconv_convs != 0) 62 if (iconv_convs != 0)
60 return; 63 return;
61 64
62 iconv_convs = new iconv_t[CONVSIZE]; 65 iconv_convs = new iconv_t[CONVSIZE];
63 66
64 setlocale(LC_CTYPE, "");
65
66#ifdef HAVE_ICONV
67#ifdef CODESET 67#ifdef CODESET
68 std::string locale_codeset = nl_langinfo(CODESET); 68 std::string locale_codeset = nl_langinfo(CODESET);
69#else // openbsd doesnt have this (yet?) 69#else // openbsd doesnt have this (yet?)
@@ -90,16 +90,17 @@ void init() {
90} 90}
91 91
92void shutdown() { 92void shutdown() {
93#ifdef HAVE_ICONV
93 if (iconv_convs == 0) 94 if (iconv_convs == 0)
94 return; 95 return;
95#ifdef HAVE_ICONV 96
96 for (int i=0; i < CONVSIZE; ++i) 97 for (int i=0; i < CONVSIZE; ++i)
97 if (iconv_convs[i] != (iconv_t)(-1)) 98 if (iconv_convs[i] != (iconv_t)(-1))
98 iconv_close(iconv_convs[i]); 99 iconv_close(iconv_convs[i]);
99#endif // HAVE_ICONV
100 100
101 delete[] iconv_convs; 101 delete[] iconv_convs;
102 iconv_convs = 0; 102 iconv_convs = 0;
103#endif // HAVE_ICONV
103} 104}
104 105
105 106