// Created: 05.11.99
// RCS-ID: $Id$
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/fontutil.h"
#include "wx/fontmap.h"
+#include "wx/encinfo.h"
#include "wx/tokenzr.h"
// ----------------------------------------------------------------------------
// convert to/from the string representation: format is
-// encodingid;facename[;charset]
+// 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;
wxString wxNativeEncodingInfo::ToString() const
{
- wxString s;
-
- s << (long)encoding << _T(';') << facename;
-
+ wxString s(facename);
if ( charset != 0 )
{
s << _T(';') << charset;
return FALSE;
}
- info->encoding = encoding;
-
return TRUE;
}