]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/fontutil.cpp
Improved selection mode handling in wxGrid::SelectBlock
[wxWidgets.git] / src / os2 / fontutil.cpp
index d36dbb08f56e241859fd5f687ca31d17d3b8100b..a3444c57653308b538ce74976013ac92bd6ddb37 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
+#ifdef __GNUG__
+    #pragma implementation "fontutil.h"
+#endif
+
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // ----------------------------------------------------------------------------
 
 // 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 +84,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 )