bug-gtypist
[Top][All Lists]
Advanced

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

Re: [bug-gtypist] ideas, implementations, patches.


From: Felix Natter
Subject: Re: [bug-gtypist] ideas, implementations, patches.
Date: Sun, 22 May 2016 10:23:41 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.4 (gnu/linux)

Gevisz <address@hidden> writes:

> On Thu, 19 May 2016 20:44:45 +0100 Tim Marston <address@hidden> wrote:
>
>> Hi,
>> 
>> On Thu, May 19, 2016 at 10:38:22PM +0300, clutton wrote:
>> > On Sat, 2016-05-14 at 16:21 +0200, Felix Natter wrote:  
>> > > A gentoo user complained that if you disable Native Language
>> > > Support (--disable-nls), then not only translation support
>> > > is disabled, but UTF8 support is broken, too. See [2].  
>> >
>> > it's probably here gtypist.c:
>> >
>> > #if defined(ENABLE_NLS) && defined(LC_ALL)
>> >   setlocale (LC_ALL, "");
>> >
>> > Moving setlocale one line up here should help, since as I understand we
>> > always need output for wide chars, with or without NLS.  
>> 
>> I can confirm that we do always use utf-8, with or without NLS.
>
> It is just not true.
>
> Or, may be, you "always do use utf8" but gtypist does not display
> utf8 characters in lessons when it is compiled without NLS use flag
> in Gentoo.

hello Gevisz,

this is now fixed in master, thanks to clutton.
Do you want to try the change in gentoo, by applying this change
to gtypist 2.9.x before you "emerge" the package:

diff --git a/src/gtypist.c b/src/gtypist.c
index 1638fbc..78a1146 100644
--- a/src/gtypist.c
+++ b/src/gtypist.c
@@ -1633,8 +1633,10 @@ int main( int argc, char **argv )
   if ( *argv0 == '/' ) argv0++;
 
   /* Internationalization */
-#if defined(ENABLE_NLS) && defined(LC_ALL)
+#if defined(LC_ALL)
   setlocale (LC_ALL, "");
+#endif
+#if defined(ENABLE_NLS) && defined(LC_ALL)
   bindtextdomain (PACKAGE, LOCALEDIR);
   /* make gettext always return strings as UTF-8
      => this makes programming easier because now _all_ strings


(simply move the setlocale() above the "#if defined(ENABLE_NLS) &&
defined(LC_ALL)".

Cheers and Best Regards,
-- 
Felix Natter



reply via email to

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