[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: perl: warning: Setting locale failed.
- To: ports_(_at_)_openbsd_(_dot_)_org
- Subject: Re: perl: warning: Setting locale failed.
- From: "Wolfgang S. Rupprecht" <wolfgang+gnus20050806_(_at_)_dailyplanet_(_dot_)_dontspam_(_dot_)_wsrcc_(_dot_)_com>
- Date: Sat, 06 Aug 2005 10:45:31 -0700
- Cancel-lock: sha1:adDDM1q/KOLTO1IcW2m/ww59Kbs=
- Organization: W S Rupprecht Computer Consulting, Fremont CA
naddy_(_at_)_mips_(_dot_)_inka_(_dot_)_de (Christian Weisgerber) writes:
> I don't follow.
> From what I understand you set LC_CTYPE=en_US.UTF-8 on your _OpenBSD_
> box, which is invalid, and then PERL_BADLANG to shut up perl. Not
> setting LC_CTYPE in the first place looks like a more straightforward
> approach.
Sorry, I guess I didn't explain very well at all. "export
LC_CTYPE=en_US.UTF-8" does do something for both emacs and xterm.
Without it both emacs and xterm have trouble reading make.log's
generated by gcc on fedora. With that LC_CYTPE setting both programs
correctly display the gcc warnings. Let me see if I can quote a few
lines:
gmfgetfeature.c: In function ‘gmf_get_feature_name0’:
gmfgetfeature.c:222: warning: format ‘%qx’ expects type ‘long long unsigned int’, but argument 5 has type ‘gf’
gmfgetfeature.c:222: warning: format ‘%qx’ expects type ‘long long unsigned int’, but argument 6 has type ‘gf’
With the LC_CYPTE set to utf-8, the back-quote and forward-quote show
up like `%qx' and `long long unsigned int` as such:
gmfgetfeature.c: In function `gmf_get_feature_name0':
gmfgetfeature.c:222: warning: format `%qx' expects type `long long unsigned int', but argument 5 has type `gf'
gmfgetfeature.c:222: warning: format `%qx' expects type `long long unsigned int', but argument 6 has type `gf'
Without the utf-8 LC_CTYPE, everything between the quotes and the
quotes shows up as the single character 'a' with a ^ over it. It
basically removes the most valuable part of all the error messages.
gmfgetfeature.c: In function `gmf_get_feature_name0':
gmfgetfeature.c:222: warning: format a^ expects type a^, but argument 5 has type a^
gmfgetfeature.c:222: warning: format a^ expects type a^, but argument 6 has type a^
So that LC_CTYPE does do something important for the programs I care
most about.
-wolfgang
Visit your host, monkey.org