bug-gtypist
[Top][All Lists]
Advanced

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

Re: [bug-gtypist] LANG issue


From: Felix Natter
Subject: Re: [bug-gtypist] LANG issue
Date: Mon, 23 Feb 2015 19:29:35 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.4 (gnu/linux)

Andrew Shagayev <address@hidden> writes:

hi Andrew,

> Hi I've got an issue trying to start gtypist with russian layout
>
> When running:
>
> `$ gtypist ru.typ`
>
> I get message:
>
> ```
> gtypist: line 34: iconv() failed on 'B: Добро пожаловать!': Illegal byte 
> sequence
> You should probably use a UTF-8 locale for the selected lesson!
> :
> ?
> ```

On your computer, the code for non-UTF8 locales is executed:

void wideaddstr(const char* UTF8Text)
{
    if (isUTF8Locale)
    {
        addstr(UTF8Text);
    }
    else
    {
        // this calls iconv()!
        char* textWithCurrentEncoding = convertUTF8ToCurrentEncoding(UTF8Text);
        addstr(textWithCurrentEncoding);
        free(textWithCurrentEncoding);
    }
}

--> Maybe ru_RU.UTF-8 is not in the list of "activated" locales
(run dpkg-reconfigure locales on Debian/Ubuntu)?

(I get a similar error when using a "ru_RU.UTF-8" locale that is not
"activated")

If you have some programming skills, you can download the source and
modify src/gtypist.c to log the value of "locale_encoding" (iconv()
tries to convert the lesson from UTF-8 to your locale's encoding).

Best Regards,
-- 
Felix Natter



reply via email to

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