Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002825 [DCSS] Bug Report minor always 2010-11-09 13:32 2011-04-02 00:36
Reporter twb2 View Status public  
Assigned To KiloByte
Priority normal Resolution done  
Status resolved   Product Branch 0.7 ancient branch
Summary 0002825: Unicode support fails unless en_US.UTF-8 locale is available.
Description The following transcript shows crawl claiming that Unicode is
unsupported until I compile the en_US.UTF-8 locale, even though that
locale is not used.

The source was compiled on a Debian Squeeze system from the "nodeps"
source tarball, with the following dep versions. This issue is
also reproducible with both git HEAD and Debian's binary package.

    liblua5.1-0-dev 5.1.4-5
    libluajit-5.1-dev 2.0.0~beta5+dfsg-1
    libncursesw5-dev 5.7+20100313-4
    libpcre3-dev 8.02-1.1
    libsqlite3-dev 3.7.3-1
    zlib1g-dev 1:1.2.3.4.dfsg-3

$ ./crawl
Unicode glyphs are not available.
$ locale
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=en_AU.UTF-8
$ sudo sed -i '$a en_US.UTF-8 UTF-8' /etc/locale.gen
$ sudo locale-gen
Generating locales (this might take a while)...
  en_AU.ISO-8859-1... done
  en_AU.UTF-8... done
  en_US.UTF-8... done
Generation complete.
$ ./crawl
See you soon, Raharin!
$
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0009256)
twb2 (reporter)
2010-11-09 13:49

OK, after doing some more code grovelling, I realized that the
makefile was defining UNICODE_LOCALE to en_US.UTF-8, *not* the empty
string.

On re-reading the makefile, I see that this is working as advertised:

    make cpp
    ---------------- -----------
    UNICODE_LOCALE= -DUNICODE_LOCALE=\"en_US.UTF-8\" (the default)
    UNICODE_LOCALE=. -DUNICODE_LOCALE=\"\" (the "Just Work" setting)

In fact, I had the exact same source of confusion LAST time I compile
crawl from source, back in the 0.6 days, and it was so annoying that I
threw away your makefile and wrote my own (which is what I've been
using until today).

I wish you'd just make UNICODE_LOCALE= map to -DUNICODE_LOCALE=\"\"
and leave en_US.UTF-8 for people who want to opt-in to the hard-coded
Americanism.
(0009257)
KiloByte (manager)
2010-11-09 14:50

Yeah, this is a known issue -- note that your workaround would break all non-UTF8 locales. A rewrite of all locale handling code is under way, and 0.8 won't suffer from this problem.
(0012031)
KiloByte (manager)
2011-04-02 00:36

It was worked around in 0.7.2, and 0.8 doesn't contain any trace of -DUNICODE_LOCALE anymore. It relies on libc's handling of locales.

- Issue History
Date Modified Username Field Change
2010-11-09 13:32 twb2 New Issue
2010-11-09 13:49 twb2 Note Added: 0009256
2010-11-09 14:50 KiloByte Note Added: 0009257
2011-04-01 16:20 jpeg Assigned To => KiloByte
2011-04-02 00:36 KiloByte Note Added: 0012031
2011-04-02 00:36 KiloByte Status new => resolved
2011-04-02 00:36 KiloByte Fixed in Branch => 0.8 development branch
2011-04-02 00:36 KiloByte Resolution open => done


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker