[SOLVED] Re: grep, ispunct() and locales/charsets

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

 



Hi,

On Fri, 2006-06-16 at 15:32 +0200, Leonard den Ottolander wrote:
> $ export LANG=mk_MK.CP1251
> $ echo -e "\x85"
> …
> $ echo -e "\x85" | grep "[[:punct:]]"
> $
> 
> Note that CP1251 is explicitly mentioned in mk_MK.

Although CP1251 is explicitly mentioned in the mk_MK locale file the
locale/charset combination isn't actually compiled as it is missing from
glibc/localedata/SUPPORTED.

Here is how I made this locale/charset combination available on my
system:

# mkdir /usr/local/lib/locale
# mkdir -p /usr/local/share/i18n/charmaps
# zcat /usr/share/i18n/charmaps/CP1251.gz \
> /usr/local/share/i18n/charmaps/CP1251
# localedef -f /usr/local/share/i18n/charmaps/CP1251 \
-i /usr/share/i18n/locales/mk_MK /usr/local/lib/locale/mk_MK.cp1251
# localedef --add-to-archive /usr/local/lib/locale/mk_MK.cp1251

$ export LANG=mk_MK.CP1251
$ echo -e "\x85." | sed -e 's/[[:punct:]]/x/g'
xx

Same approach can be taken for other locale/charset combinations (f.e.
en_US.CP1252).

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux