From: Vadim Zeitlin Date: Tue, 29 Jun 2004 07:48:15 +0000 (+0000) Subject: recognize roman8 charset as us-ascii (this is wrong but better than not recognizing... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/976266244ca03b71f434c4b4e41b9903a1955121 recognize roman8 charset as us-ascii (this is wrong but better than not recognizing it at all) (fixes bug 978251) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/intl.cpp b/src/common/intl.cpp index d538dd72c9..6f974e5e4b 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -2170,7 +2170,7 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix) // this is a bit strange as under Windows we get the encoding name using its // numeric value and under Unix we do it the other way round, but this just -// reflects the way different systems provide he encoding info +// reflects the way different systems provide the encoding info /* static */ wxString wxLocale::GetSystemEncodingName() @@ -2202,8 +2202,18 @@ wxString wxLocale::GetSystemEncodingName() // ISO-646, i.e. 7 bit ASCII // // and recent glibc call it ANSI_X3.4-1968... - if ( strcmp(alang, "646") == 0 || - strcmp(alang, "ANSI_X3.4-1968") == 0 ) + // + // HP-UX uses HP-Roman8 cset which is not the same as ASCII (see RFC + // 1345 for its definition) but must be recognized as otherwise HP + // users get a warning about it on each program startup, so handle it + // here -- but it would be obviously better to add real supprot to it, + // of course! + if ( strcmp(alang, "646") == 0 + || strcmp(alang, "ANSI_X3.4-1968") == 0 +#ifdef __HPUX__ + || strcmp(alang, "roman8") == 0 +#endif // __HPUX__ + ) { encname = _T("US-ASCII"); }