Ticket #237: sg_unicode.patch
File sg_unicode.patch, 2.0 KB (added by , 17 years ago) |
---|
-
clientgui/SkinManager.cpp
1207 1207 // First we try the users canonical locale resources. 1208 1208 // i.e. en_US 1209 1209 retval = ERR_XML_PARSE; 1210 p = fopen( ConstructSkinFileName().c_str(), "r");1210 p = fopen((const char*)wxString(ConstructSkinFileName().c_str(), wxConvUTF8).c_str(), "r"); 1211 1211 if (p) { 1212 1212 mf.init_file(p); 1213 1213 retval = Parse(mf, strDesiredLocale); … … 1218 1218 // locale. 1219 1219 // i.e. en 1220 1220 if (ERR_XML_PARSE == retval) { 1221 p = fopen( ConstructSkinFileName().c_str(), "r");1221 p = fopen((const char*)wxString(ConstructSkinFileName().c_str(), wxConvUTF8).c_str(), "r"); 1222 1222 if (p) { 1223 1223 mf.init_file(p); 1224 1224 retval = Parse(mf, strDesiredLocale.Left(2)); … … 1229 1229 // If we failed the second lookup try english 1230 1230 // i.e. en 1231 1231 if (ERR_XML_PARSE == retval) { 1232 p = fopen( ConstructSkinFileName().c_str(), "r");1232 p = fopen((const char*)wxString(ConstructSkinFileName().c_str(), wxConvUTF8).c_str(), "r"); 1233 1233 if (p) { 1234 1234 mf.init_file(p); 1235 1235 retval = Parse(mf, wxT("en")); … … 1343 1343 1344 1344 // Look for the begining of the desired locale. 1345 1345 while (in.fgets(buf, 256)) { 1346 if (match_tag(buf, strLocaleStartTag.c_str())) {1346 if (match_tag(buf, (const char*)wxString(strLocaleStartTag.c_str(), wxConvUTF8).c_str())) { 1347 1347 bLocaleFound = true; 1348 1348 break; 1349 1349 } … … 1352 1352 if (!bLocaleFound) return ERR_XML_PARSE; 1353 1353 1354 1354 while (in.fgets(buf, 256)) { 1355 if (match_tag(buf, strLocaleEndTag.c_str())) break;1355 if (match_tag(buf, (const char*)wxString(strLocaleEndTag.c_str(), wxConvUTF8).c_str())) break; 1356 1356 else if (match_tag(buf, "<simple>")) { 1357 1357 m_SimpleSkin.Parse(in); 1358 1358 continue;