Ticket #237: sg_unicode.2.patch

File sg_unicode.2.patch, 1.8 kB (added by fthomas, 1 year ago)

this new patch is much cleaner

  • SkinManager.cpp

    old new  
    12071207    // First we try the users canonical locale resources. 
    12081208    //  i.e. en_US 
    12091209    retval = ERR_XML_PARSE; 
    1210     p = fopen(ConstructSkinFileName().c_str(), "r"); 
     1210    p = fopen((const char*)ConstructSkinFileName().mb_str(wxConvUTF8), "r"); 
    12111211    if (p) { 
    12121212        mf.init_file(p); 
    12131213        retval = Parse(mf, strDesiredLocale); 
     
    12181218    //   locale. 
    12191219    //  i.e. en 
    12201220    if (ERR_XML_PARSE == retval) { 
    1221         p = fopen(ConstructSkinFileName().c_str(), "r"); 
     1221        p = fopen((const char*)ConstructSkinFileName().mb_str(wxConvUTF8), "r"); 
    12221222        if (p) { 
    12231223            mf.init_file(p); 
    12241224            retval = Parse(mf, strDesiredLocale.Left(2)); 
     
    12291229    // If we failed the second lookup try english 
    12301230    //  i.e. en 
    12311231    if (ERR_XML_PARSE == retval) { 
    1232         p = fopen(ConstructSkinFileName().c_str(), "r"); 
     1232        p = fopen((const char*)ConstructSkinFileName().mb_str(wxConvUTF8), "r"); 
    12331233        if (p) { 
    12341234            mf.init_file(p); 
    12351235            retval = Parse(mf, wxT("en")); 
     
    13431343 
    13441344    // Look for the begining of the desired locale. 
    13451345    while (in.fgets(buf, 256)) { 
    1346         if (match_tag(buf, strLocaleStartTag.c_str())) { 
     1346        if (match_tag(buf, (const char*)strLocaleStartTag.mb_str(wxConvUTF8))) { 
    13471347            bLocaleFound = true; 
    13481348            break; 
    13491349        } 
     
    13521352    if (!bLocaleFound) return ERR_XML_PARSE; 
    13531353 
    13541354    while (in.fgets(buf, 256)) { 
    1355         if (match_tag(buf, strLocaleEndTag.c_str())) break; 
     1355        if (match_tag(buf, (const char*)strLocaleEndTag.mb_str(wxConvUTF8))) break; 
    13561356        else if (match_tag(buf, "<simple>")) { 
    13571357            m_SimpleSkin.Parse(in); 
    13581358            continue; 

If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.