Added wxString::FromAscii() wxString::ToAscii().

Removed wxConvFile, made it a define wxConvLocal.
  Exchanged some wxConvLibc to wxConvLocal calls.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-08-11 13:09:57 +00:00
parent 43330cc9de
commit b1ac3b56e6
12 changed files with 141 additions and 68 deletions

View File

@@ -1276,7 +1276,7 @@ wxString wxLocale::GetSystemEncodingName()
}
else
{
encname = wxConvLibc.cMB2WX(alang);
encname = wxString::FromAscii( alang );
}
}
else
@@ -1285,24 +1285,24 @@ wxString wxLocale::GetSystemEncodingName()
// if we can't get at the character set directly, try to see if it's in
// the environment variables (in most cases this won't work, but I was
// out of ideas)
wxChar *lang = wxGetenv(wxT("LC_ALL"));
wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL;
char *lang = getenv( "LC_ALL");
char *dot = lang ? strchr(lang, '.') : (char *)NULL;
if (!dot)
{
lang = wxGetenv(wxT("LC_CTYPE"));
lang = getenv( "LC_CTYPE" );
if ( lang )
dot = wxStrchr(lang, wxT('.'));
dot = strchr(lang, '.' );
}
if (!dot)
{
lang = wxGetenv(wxT("LANG"));
lang = getenv( "LANG");
if ( lang )
dot = wxStrchr(lang, wxT('.'));
dot = strchr(lang, '.');
}
if ( dot )
{
encname = dot+1;
encname = wxString::FromAscii( dot+1 );
}
}
#endif // Win32/Unix