This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Character set of a locale


Florian Weimer <fweimer@redhat.com> skribis:

> Is there a way to print the character set of the current locale using a
> command line tool?  âlocaleâ does not print this information, unfortunately.

Probably not as convenient as youâd like:

--8<---------------cut here---------------start------------->8---
$ guile -c '(use-modules (ice-9 i18n)) \
            (display (locale-encoding (make-locale LC_ALL "fr_FR.utf8")))'
UTF-8
--8<---------------cut here---------------end--------------->8---

It uses ânewlocaleâ and ânl_langinfo_lâ.

Ludoâ.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]