Bug 16222 - LC_CTYPE from enviroment is ignored,
LC_CTYPE from enviroment is ignored,
Product: Red Hat Linux
Classification: Retired
Component: gnupg (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
: 24342 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2000-08-15 05:45 EDT by noa
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-08-16 10:56:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
a patch that fixes the problem (383 bytes, patch)
2000-08-15 05:49 EDT, noa
no flags Details | Diff

  None (edit)
Description noa 2000-08-15 05:45:08 EDT
the LC_CTYPE locale setting is not imported from the enviroment. This leads
to ugly translations of characters in different charsets than US-ASCII.
For example in swedish (test with LANG=sv) all occurances of e is
translated to aa and so forth. I will include a patch solve the problem
Comment 1 noa 2000-08-15 05:49:38 EDT
Created attachment 2496 [details]
a patch that fixes the problem
Comment 2 Nalin Dahyabhai 2000-08-15 17:41:04 EDT
This will be fixed in gnupg-1.0.2-2.  Thanks!
Comment 3 noa 2000-08-16 10:56:46 EDT
sorry to come with bad news, but i had an email discussion with Werner Koch
(gnupg maintainer)
and he notified me that some function calls in the gnupg source depend on the
LC_CTYPE locale
being set to C (notably isalpha() and friends). I will work to get a better
patch and come back to
you then.
Comment 4 Nalin Dahyabhai 2000-08-16 11:14:55 EDT
Aaargh.  Reverting the patch.
Comment 5 Daniel Roesen 2000-10-20 21:44:29 EDT
Hm. Now the 1.0.4 RPMs contain the following patch:

   #ifdef ENABLE_NLS
-    #ifdef HAVE_LC_MESSAGES
-       setlocale( LC_TIME, "" );
-       setlocale( LC_MESSAGES, "" );
-    #else
-       setlocale( LC_ALL, "" );
-    #endif
     bindtextdomain( PACKAGE, G10_LOCALEDIR );
     textdomain( PACKAGE );
+    setlocale( LC_ALL, "" );

Is that really correct/needed? Nalin, could you please shed some light what the
effect of that change is? Is it a RH-only abnormally? If not, why did Werner not
fix this since 1.0.2?

BTW: does Werner know about the strlen fix?

-                && !strcmp(fname+strlen(defhome+1)-strlen(defhome+1),
+                && !strcmp(fname+strlen(fname)-strlen(defhome+1),
Comment 6 Nalin Dahyabhai 2001-01-20 18:45:43 EST
*** Bug 24342 has been marked as a duplicate of this bug. ***
Comment 7 Nalin Dahyabhai 2001-01-20 18:50:05 EST
Just double-checked my sent-mail folder.  We sent the patch to wk@gnupg.org on
10/19, so yes, it should show up in a forthcoming release.

Note You need to log in before you can comment on or make changes to this bug.