bug-indent
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-indent] Bug#205692: indent: [patch] fix garble shown in locale (fwd


From: Santiago Vila
Subject: [Bug-indent] Bug#205692: indent: [patch] fix garble shown in locale (fwd)
Date: Sun, 17 Aug 2003 12:13:58 +0200 (CEST)

Hello.

I have received this report from the Debian bug system.
[ Please keep the Cc: lines when replying. Thanks. ]

---------- Forwarded message ----------
From: Geoffrey Lee <address@hidden>
To: Debian Bug Tracking System <address@hidden>
Date: Sat, 16 Aug 2003 18:38:40 +0800
Subject: Bug#205692: indent: [patch] fix garble shown in locale

Package: indent
Version: 2.2.9-1
Severity: normal
Tags: patch


Hi,

indent has a problem with its setlocale() in that it only sets the
LC_MESSAGES -- this is insufficient for certain locales, such as
Chinese.  If LC_CTYPE is not set as well, garbage will be displayed
on the screen and makes it completely unusable in that locale.

I am including a patch for which the Debian project can apply to fix
this, for this to go upstream, however, checks within configure must
be made such that LC_CTYPE is checked, or just set LC_ALL instead.

Something like

#if defined (HAVE_SETLOCALE) && defined(HAVE_LCMESSAGES) && defined 
(HAVE_LCCTYPE)
        setlocale(...);
        setlocale(...);
#endif


Or

#if defined (HAVE_SETLOCALE) && defined (HAVE_LCALL)
        setlocale(...);
#endif

        - G.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux anakin 2.4.21 #9 SMP ¤é 7¤ë 6 11:18:21 HKT 2003 i686
Locale: LANG=zh_TW.Big5, LC_CTYPE=zh_TW.Big5

Versions of packages indent depends on:
ii  libc6                         2.3.2-2    GNU C Library: Shared libraries an

-- no debconf information

--- indent-2.2.9.orig/src/indent.c      2002-10-29 04:00:56.000000000 +0800
+++ indent-2.2.9/src/indent.c   2003-08-16 18:32:28.000000000 +0800
@@ -3064,6 +3064,7 @@

 #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
     setlocale (LC_MESSAGES, "");
+    setlocale (LC_CTYPE, "");
 #endif
     bindtextdomain (PACKAGE, LOCALEDIR);
     textdomain (PACKAGE);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]