This is the mail archive of the
libc-locales@sourceware.org
mailing list for the GNU libc locales project.
Re: UTF-8 to <U###> syntax?
- From: Bruno Haible <bruno at clisp dot org>
- To: libc-locales at sourceware dot org
- Cc: "Jonathan D. Proulx" <jon at csail dot mit dot edu>
- Date: Fri, 8 Jun 2007 04:13:41 +0200
- Subject: Re: UTF-8 to <U###> syntax?
- References: <20070323202148.GJ20703@csail.mit.edu>
Jonathan D. Proulx asked on 2007-03-23:
> anyone have a utility for converting from utf-8 text to the <U####>
> syntax used in the locale files?
The 'iconv' program from GNU libiconv [1] can do it:
$ echo ÐÑÑÑÐÐÐ |
iconv -f UTF-8 -t ASCII --unicode-subst='<U%04X>'
<U0420><U0443><U0441><U0441><U043A><U0438><U0439>
Bruno
[1] http://www.gnu.org/software/libiconv/