bug-gnu-utils
[Top][All Lists]
Advanced

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

[PATCH] Gettext tools fail under Turkish locale (tr_TR)


From: Recai Oktas
Subject: [PATCH] Gettext tools fail under Turkish locale (tr_TR)
Date: Sat, 5 Feb 2005 16:50:58 +0200
User-agent: Mutt/1.5.6+20040907i

Hi,

Due to the infamous 'i/I' issue[1] of Turkish (and Azeri, as well), gettext
tools fail under Turkish locale: 

    $ echo $LANG
    tr_TR
    $ msgconv new.po -t UTF-8 -o old.po
    msgconv: new.po: uyarı: "iso-8859-9" karakter kümesi kabul görmüş bir isim 
değil.
                            Kullanıcının karakter kümesine dönüşüm 
yapılamıyabilir.
    msgconv: mevcut karakter kümesi "iso-8859-9" kabul görmüş bir kodlama ismi 
değil

    (The last message in English: present charset "iso-8859-9" is not a portable
     encoding name)

No problem with the following command:

    $ LC_ALL=C msgconv new.po -t UTF-8 -o old.po

As can be noticed from the error message above, strcasecmp fails on the
"iso-8859-9" vs "ISO-8859-9" comparison, as the uppercase of 'i' in Turkish
locale is <Idotabove> instead of 'I'.  We should make a strcasecmp in ASCII
domain to fix this issue.  I've successfully tested the patch attached.  It
introduces a few functions: strcasecmp_ascii and strncasecmp_ascii for this
purpose.  I've replaced all the strcasecmp/strncasecmp calls with the
corresponding ascii equivalents, since these comparisons were actually ASCII in
nature.  Could you please intestigate the patch?

Regards,

[1] http://www.i18nguy.com/unicode/turkish-i18n.html

-- 
roktas

Attachment: strcasecmp-ascii.patch.gz
Description: Binary data

Attachment: signature.asc
Description: Digital signature


reply via email to

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