X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8cde57b8367b4e853fbe45d88ee23cea4a301e9..e0f15f4ac04b6f1ff6288ece16d44e76663e850d:/src/os2/fontutil.cpp diff --git a/src/os2/fontutil.cpp b/src/os2/fontutil.cpp index d36dbb08f5..5f135b0327 100644 --- a/src/os2/fontutil.cpp +++ b/src/os2/fontutil.cpp @@ -42,12 +42,18 @@ // ---------------------------------------------------------------------------- // convert to/from the string representation: format is -// facename[;charset] +// encodingid;facename[;charset] bool wxNativeEncodingInfo::FromString(const wxString& s) { wxStringTokenizer tokenizer(s, _T(";")); + wxString encid = tokenizer.GetNextToken(); + long enc; + if ( !encid.ToLong(&enc) ) + return FALSE; + encoding = (wxFontEncoding)enc; + facename = tokenizer.GetNextToken(); if ( !facename ) return FALSE; @@ -74,7 +80,10 @@ bool wxNativeEncodingInfo::FromString(const wxString& s) wxString wxNativeEncodingInfo::ToString() const { - wxString s(facename); + wxString s; + + s << (long)encoding << _T(';') << facename; + // TODO: what is this for OS/2? /* if ( charset != ANSI_CHARSET )