James B. Byrne
2012-Dec-15 13:52 UTC
[CentOS] Cannot build custom locale with utf-8 charset
I am trying, without success, to compile a custom locale for the utf-8 character set. I have issued this command: localedef --no-archive -f UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8 which produces the requisite files without reporting an error but which none-the-less insists on using the iso-8859-1 charset: LC_ALL=en_CA at yyyy-mm-dd locale charmap ISO-8859-1 So, I tried this variant: localedef --no-archive -f /usr/share/i18n/charmaps/UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8 character map file `/usr/share/i18n/charmaps/UTF-8' not found: No such file or directory no output file produced because warnings were issued Missing UTF-8 file? ll /usr/share/i18n/charmaps/UTF-8* . . . -rw-r--r-- 1 root root 240800 Aug 27 09:28 UTF-8.gz . . . Ok, let us try again: localedef --no-archive -f /usr/share/i18n/charmaps/UTF-8.gz -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8 /usr/share/i18n/charmaps/UTF-8.gz:1: syntax error in prolog: invalid definition /usr/share/i18n/charmaps/UTF-8.gz:2: syntax error in prolog: invalid definition memory clobbered past end of allocated block Aborted OK, fine, be that way. cd /usr/share/i18n/charmaps gunzip UTF-8.gz ll UTF-8* -rw-r--r-- 1 root root 1432559 Aug 27 09:28 UTF-8 localedef --no-archive -f /usr/share/i18n/charmaps/UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8 LC_ALL=en_CA at yyyy-mm-dd locale charmap ISO-8859-1 Ok, I give up. What little tid-bit of information am I overlooking or just not understanding correctly. How do I get this thing built with the UTF-8 character set? -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
Leonard den Ottolander
2012-Dec-16 19:11 UTC
[CentOS] Cannot build custom locale with utf-8 charset
Hello James, On Sat, 2012-12-15 at 08:52 -0500, James B. Byrne wrote:> localedef --no-archive -f UTF-8 -i > /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8 > > which produces the requisite files without reporting an error but > which none-the-less insists on using the iso-8859-1 charset: > > LC_ALL=en_CA at yyyy-mm-dd locale charmap > ISO-8859-1How about actually using the new locale? $ LC_ALL=en_CA at yyyy-mm-dd.utf8 locale charmap Regards, Leonard. -- mount -t life -o ro /dev/dna /genetic/research
James B. Byrne
2012-Dec-17 16:03 UTC
[CentOS] Cannot build custom locale with utf-8 charset
Whether the following information is complete or entirely correct or contains redundancies I will leave for others to comment upon. In the end, to completely install a working UTF-8 locale from a customized source file in /usr/share/i18n/locales on both CentOS-5 and CentOS-6 I had to do this: localedef --replace -c -f UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf8 localedef --no-archive -c -f UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.utf-8 localedef --no-archive -c -f UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.UTF8 localedef --no-archive -c -f UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd.UTF-8 localedef --no-archive -c -f UTF-8 -i /usr/share/i18n/locales/en_CA at yyyy-mmm-dd en_CA at yyyy-mmm-dd Evidently, the archived version is expected to have the extension .utf8 but all the other aliased extensions are customarily expected as well. I was unable to find where on the system said locale aliases are kept however. The most likely candidate that I found was /usr/share/X11/locale/locale.alias but I could find no entries therein pertaining to my customized locales. I would like to know the exact location where locale aliases are stored on CentOS systems if someone in the know would share that information. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
Leonard den Ottolander
2012-Dec-17 22:08 UTC
[CentOS] Cannot build custom locale with utf-8 charset
Hello James, On Mon, 2012-12-17 at 11:03 -0500, James B. Byrne wrote:> I was unable to find where on the system said locale aliases > are kept however./usr/lib/locale Regards, Leonard. -- mount -t life -o ro /dev/dna /genetic/research
Possibly Parallel Threads
- KVM guest fails to boot cleanly
- How to get dd mmm and yyyy from dd-mmm-yyyy
- Customizing locale settings in CentOS-4.5
- SolrCore 'dovecot' is not available due to init failure: fieldType 'text_general' not found in the schema
- Print date on y axis with month, day, and year