bug-gtypist
[Top][All Lists]
Advanced

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

Re: [bug-gtypist] Invalid or incomplete multibyte or wide character


From: Felix Natter
Subject: Re: [bug-gtypist] Invalid or incomplete multibyte or wide character
Date: Thu, 31 Dec 2015 12:52:34 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.4 (gnu/linux)

gevisz <address@hidden> writes:

> 2015-12-28 16:54 GMT+02:00 Chris Jones <address@hidden>:
>> On Sun, Dec 27, 2015 at 05:17:39AM EST, gevisz wrote:
>>> I have just installed gtypist v.2.9.5 on my Gentoo box and tried
>>> $ gtypist ru.typ
>>> gtypist: line 34: iconv() failed on 'B: Добро пожаловать!':
>>> Invalid or incomplete multibyte or wide character
>>> You should probably use a UTF-8 locale for the selected lesson!
>>>  :
>>>  ?

hello gevisz,
hello Chris,

iconv conversion is only used if no UTF-8 locale is detected:
  
http://git.savannah.gnu.org/gitweb/?p=gtypist.git;a=blob;f=src/utf8.c;h=8eab3d34c472996f1ebf52ab842f48842c5245ec;hb=refs/heads/branch-2.9

This is how it is detected
(http://git.savannah.gnu.org/gitweb/?p=gtypist.git;a=blob;f=src/gtypist.c;h=7328ac6262ae9f8c3cfe89a368bd585fcd59b7e6;hb=refs/heads/branch-2.9):

#ifdef MINGW
  locale_encoding = "UTF-8";
#else
  locale_encoding = nl_langinfo(CODESET);
#endif
  isUTF8Locale = strcasecmp(locale_encoding, "UTF-8") == 0 ||
      strcasecmp(locale_encoding, "UTF8") == 0;
  /* printf("encoding is %s, UTF8=%d\n", locale_encoding, isUTF8Locale); */

Since you build from source on gentoo:
Can you check whether this appears when running ./configure?
  checking for nl_langinfo and CODESET... yes

Also, which arguments are used for ./configure?

If that doesn't help, can you enable to printf above and post the
output?

>> | $ iconv --version
>> |
>> |   iconv (Debian GLIBC 2.19-18+deb8u1) 2.19
>
> $ iconv --version
> iconv (Gentoo 2.21-r1 p5) 2.21
>
> equery uses iconv
> [ Legend : U - final flag setting for installation]
> [              : I - package is installed with flag     ]
>  * Found these USE flags for dev-haskell/iconv-0.4.1.3:
>  U I
>  - - doc      : Add extra documentation (API, Javadoc, etc). It is
> recommended to enable per package instead of globally
>  - - hscolour : Include coloured haskell sources to generated
> documentation (dev-haskell/hscolour)
>  - - profile  : Add support for software performance analysis (will
> likely vary from ebuild to ebuild)
>
>> Standalone iconv doesn't complain about the contents of the ru.typ file
>> either:
>>
>> | $ iconv ru.typ -o /dev/null
>> | $ echo $?
>> | 0

The problem is that iconv shouldn't be called, it is only used to
convert UTF-8 lessons to an 8-bit locale (like russian-8bit).

Cheers and Happy New Year!
-- 
Felix Natter



reply via email to

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