1 |
About a week ago, I have installed |
2 |
gtypist and tried to run it with ru.typ |
3 |
that comes with it: |
4 |
$ gtypist ru.typ |
5 |
gtypist: line 34: iconv() failed on 'B: Добро пожаловать!': |
6 |
Invalid or incomplete multibyte or wide character |
7 |
You should probably use a UTF-8 locale for the selected lesson! |
8 |
: |
9 |
? |
10 |
|
11 |
What can I do about it? |
12 |
|
13 |
My |
14 |
$ locale |
15 |
LANG=en_US.UTF-8 |
16 |
LC_CTYPE=en_US.UTF-8 |
17 |
LC_NUMERIC=en_US.UTF-8 |
18 |
LC_TIME=en_US.UTF-8 |
19 |
LC_COLLATE=C |
20 |
LC_MONETARY=en_US.UTF-8 |
21 |
LC_MESSAGES=en_US.UTF-8 |
22 |
LC_PAPER=en_US.UTF-8 |
23 |
LC_NAME=en_US.UTF-8 |
24 |
LC_ADDRESS=en_US.UTF-8 |
25 |
LC_TELEPHONE=en_US.UTF-8 |
26 |
LC_MEASUREMENT=en_US.UTF-8 |
27 |
LC_IDENTIFICATION=en_US.UTF-8 |
28 |
LC_ALL= |
29 |
|
30 |
|
31 |
I have already posted this question on gtypist mailing list |
32 |
and got the answers that |
33 |
|
34 |
1. This doesn't happen on Debian stable with the same |
35 |
version of gtypist and the same locale. |
36 |
|
37 |
2. In this case, iconv shouldn't be called at all as it is only |
38 |
used to convert UTF-8 lessons to an 8-bit locale (like russian-8bit). |
39 |
|
40 |
Below is the additional details of the second answer: |
41 |
|
42 |
iconv conversion is only used if no UTF-8 locale is detected. |
43 |
This is how it is detected: |
44 |
(http://git.savannah.gnu.org/gitweb/?p=gtypist.git;a=blob;f=src/gtypist.c;h=7328ac6262ae9f8c3cfe89a368bd585fcd59b7e6;hb=refs/heads/branch-2.9): |
45 |
|
46 |
#ifdef MINGW |
47 |
locale_encoding = "UTF-8"; |
48 |
#else |
49 |
locale_encoding = nl_langinfo(CODESET); |
50 |
#endif |
51 |
isUTF8Locale = strcasecmp(locale_encoding, "UTF-8") == 0 || |
52 |
strcasecmp(locale_encoding, "UTF8") == 0; |
53 |
/* printf("encoding is %s, UTF8=%d\n", locale_encoding, isUTF8Locale); */ |
54 |
|
55 |
Since you build from source on gentoo: |
56 |
Can you check whether this appears when running ./configure? |
57 |
checking for nl_langinfo and CODESET... yes |
58 |
|
59 |
Also, which arguments are used for ./configure? |
60 |
|
61 |
If that doesn't help, can you enable to printf above and post the |
62 |
output? |