From 3fa35ec01869df4868802aeb6f1349fe98b6f2a4 Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 23 Apr 2003 14:42:09 +0000 Subject: [PATCH] Mirror 1.1.x changes. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@3649 7a7537e8-13f0-0310-91df-b6672ffda945 --- CHANGES-1.1.txt | 9 +++++++-- CREDITS.txt | 12 +++++++++--- cups/language.c | 27 +++++++++++++++++++++++++-- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/CHANGES-1.1.txt b/CHANGES-1.1.txt index 7d515f1a2d..ac2c4a059c 100644 --- a/CHANGES-1.1.txt +++ b/CHANGES-1.1.txt @@ -3,10 +3,15 @@ CHANGES-1.1.txt CHANGES IN CUPS V1.1.19rc3 + - cupsLangGet() needs to set the CTYPE locale to "C" + (POSIX) to avoid erroneous tolower/toupper values (fix + suggested by Bjoern Jacke) - Fixed a typo in the cups.list.in file. - Updated all of the Western European locales to default - to ISO-8859-15 (for Euro support) - - Updated the German message catalog. + to ISO-8859-15 (for Euro support, suggested by Bjoern + Jacke) + - Updated the German message catalog (update provided by + Bjoern Jacke) CHANGES IN CUPS V1.1.19rc2 diff --git a/CREDITS.txt b/CREDITS.txt index 71bad14862..0f067824f7 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -1,4 +1,4 @@ -CREDITS.txt - 01/27/2000 +CREDITS.txt - 04/23/2003 ------------------------ Few projects are completed by one person, and CUPS is no exception. We'd @@ -8,19 +8,25 @@ like to thank the following individuals for their contributions: N. Becker - setsid(). Jean-Eric Cuendet - GhostScript filters for CUPS. Van Dang - HTTP and IPP policeman. + L. Peter Deutsch - MD5 code. Dr. ZP Han - setgid()/setuid(). Guy Harris - *BSD shared libraries and lots of other fixes. + Bjoern Jacke - I18N stuff. Wang Jian - CUPS RPM corrections. Roderick Johnstone - Beta tester of the millenium. + Till Kamppeter - Bug fixes, beta testing, evangelism. + Kiko - Bug fixes. Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester. Mark Lawrence - Microsoft interoperability testing. + Jeff Licquia - Bug fixes, beta testing, evangelism. Jason McMullan - Original CUPS RPM distributions. Wes Morgan - *BSD fixes. Ulrich Oldendorf - German locale. + Giulio Orsero - Bug fixes and testing. + Kurt Pfeifle - Bug fixes, beta testing, evangelism. Petter Reinholdtsen - HP-UX compiler stuff. Stuart Stevens - HP JetDirect IPP information. - Kiko - Bug fixes. - L. Peter Deutsch - MD5 code. + Andrea Suatoni - IRIX desktop integration and testing. If I've missed someone, please let me know by sending an email to "mike@easysw.com". diff --git a/cups/language.c b/cups/language.c index 39b541404c..e7c4646ae3 100644 --- a/cups/language.c +++ b/cups/language.c @@ -1,5 +1,5 @@ /* - * "$Id: language.c,v 1.20.2.16 2003/04/18 13:37:36 mike Exp $" + * "$Id: language.c,v 1.20.2.17 2003/04/23 14:42:09 mike Exp $" * * I18N/language support for the Common UNIX Printing System (CUPS). * @@ -228,6 +228,7 @@ cupsLangGet(const char *language) /* I - Language or locale */ cups_msg_t msg; /* Message number */ char *text; /* Message text */ cups_lang_t *lang; /* Current language... */ + const char *oldlocale; /* Old locale name */ static const char * const locale_encodings[] = { /* Locale charset names */ "ASCII", "ISO8859-1", "ISO8859-2", "ISO8859-3", @@ -289,6 +290,18 @@ cupsLangGet(const char *language) /* I - Language or locale */ language = setlocale(LC_ALL, ""); #endif /* __APPLE__ */ + /* + * Set the locale back to POSIX while we do string ops, since + * apparently some buggy C libraries break ctype() for non-I18N + * chars... + */ + +#if defined(__APPLE__) || !defined(LC_CTYPE) + oldlocale = setlocale(LC_ALL, "C"); +#else + oldlocale = setlocale(LC_CTYPE, "C"); +#endif /* __APPLE__ || !LC_CTYPE */ + /* * Parse the language string passed in to a locale string. "C" is the * standard POSIX locale and is copied unchanged. Otherwise the @@ -384,6 +397,16 @@ cupsLangGet(const char *language) /* I - Language or locale */ strcpy(real, "C"); } + /* + * Restore the locale... + */ + +#if defined(__APPLE__) || !defined(LC_CTYPE) + setlocale(LC_ALL, oldlocale); +#else + setlocale(LC_CTYPE, oldlocale); +#endif /* __APPLE__ || !LC_CTYPE */ + /* * See if we already have this language loaded... */ @@ -707,5 +730,5 @@ appleLangDefault(void) /* - * End of "$Id: language.c,v 1.20.2.16 2003/04/18 13:37:36 mike Exp $". + * End of "$Id: language.c,v 1.20.2.17 2003/04/23 14:42:09 mike Exp $". */ -- 2.47.3