Re: perl: warning: Setting locale failed.
Christian Weisgerber dixit: >>From what I understand you set LC_CTYPE=en_US.UTF-8 on your _OpenBSD_ >box, which is invalid I don't think so. /usr/X11R6/bin/uxterm sets it, too. My IRC client works with it, as does the silc client. I've been using it for ages. //mirabile -- I believe no one can invent an algorithm. One just happens to hit upon it when God enlightens him. Or only God invents algorithms, we merely copy them. If you don't believe in God, just consider God as Nature if you won't deny existence. -- Coywolf Qi Hunt
Re: perl: warning: Setting locale failed.
On Sat, Aug 06, 2005 at 10:45:31AM -0700, Wolfgang S. Rupprecht wrote: > 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. Not quite necessary. You can keep Perl quiet and get your UTF-8 supporting applications to work with these steps: Put in .Xdefaults XTerm*locale: UTF-8 (you may need XENVIRONMENT=$HOME/.Xdefaults in .profile; or use .Xresources) Put in your .kshrc alias more='LANG=en_US.UTF-8 more' (of course ENV=$HOME/.kshrc in .profile; adjust to .cshrc for csh) In .vimrc set encoding=utf-8 I bet Emacs has similar Lisp incantation that you can put in .emacs If not you can use aliasing similar to 'more' above. Best regards, Zvezdan Petkovic
Re: perl: warning: Setting locale failed.
[EMAIL PROTECTED] (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
Re: perl: warning: Setting locale failed.
On Sat, Aug 06, 2005 at 12:39:27PM +, Christian Weisgerber wrote: > Wolfgang S. Rupprecht <[EMAIL PROTECTED]> wrote: > > > > > Getting perl to shut up about the LANG variable was probably all I > > > > really needed from perl. (And that was a simple "export > > > > PERL_BADLANG=0"). > > > > > > Why set LC_CTYPE to an unsupported value in the first place? > > > > Because the choice is that or re-installing netbsd on that machine? > > 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. > > -- > Christian "naddy" Weisgerber [EMAIL PROTECTED] If I understand things right, he might be using the OpenBSD box in linux compat mode to get at the redhat messages. In which case, wrapping the linux compiler in a shell script that would set LC_CTYPE would be the right thing to do.
Re: perl: warning: Setting locale failed.
Wolfgang S. Rupprecht <[EMAIL PROTECTED]> wrote: > > > Getting perl to shut up about the LANG variable was probably all I > > > really needed from perl. (And that was a simple "export > > > PERL_BADLANG=0"). > > > > Why set LC_CTYPE to an unsupported value in the first place? > > Because the choice is that or re-installing netbsd on that machine? 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. -- Christian "naddy" Weisgerber [EMAIL PROTECTED]
Re: perl: warning: Setting locale failed.
[EMAIL PROTECTED] (Christian Weisgerber) writes: > Wolfgang S. Rupprecht <[EMAIL PROTECTED]> wrote: > > > Getting perl to shut up about the LANG variable was probably all I > > really needed from perl. (And that was a simple "export > > PERL_BADLANG=0"). > > Why set LC_CTYPE to an unsupported value in the first place? Because the choice is that or re-installing netbsd on that machine? I need to see output generated by a current fedora system. Either I can see the a usable gcc error msg or the OS goes. -wolfgang -- Wolfgang S. Rupprechthttp://www.wsrcc.com/wolfgang/ Microsoft Vista - because "Virus Installer" was too long.
Re: perl: warning: Setting locale failed.
Wolfgang S. Rupprecht <[EMAIL PROTECTED]> wrote: > Getting perl to shut up about the LANG variable was probably all I > really needed from perl. (And that was a simple "export > PERL_BADLANG=0"). Why set LC_CTYPE to an unsupported value in the first place? -- Christian "naddy" Weisgerber [EMAIL PROTECTED]
Re: perl: warning: Setting locale failed.
Marc Espie <[EMAIL PROTECTED]> writes: > Note that this ought to work in about six months time. > > UTF8 support won't make OpenBSD 3.8, but I hope to commit it a little > bit after that. Thanks! Now that I sat back and thought about it a bit longer, it probably doesn't even matter to me that most of the aspects of UTF-8 processing work completely. Both xterm and emacs already work well enough for my purposes. All I needed to do is read gcc error strings produced by fedora FC4. For some silly reason that gcc used some high-page unicode forward-tick and back-tick for quoting things in error/warning messages. Getting perl to shut up about the LANG variable was probably all I really needed from perl. (And that was a simple "export PERL_BADLANG=0"). -wolfgang
Re: perl: warning: Setting locale failed.
On Wed, Aug 03, 2005 at 02:38:35PM -0700, Wolfgang S. Rupprecht wrote: > > What needs to be done to get perl on obsd to not gripe about > LC_CTYPE=en_US.UTF-8 ? I need the utf-8 setting for interoperability > with some other OS's that I'm doing cross-development work with. > > $ any-perl-script > perl: warning: Setting locale failed. > perl: warning: Please check that your locale settings: > LC_ALL = (unset), > LC_CTYPE = "en_US.UTF-8", > LANG = (unset) > are supported and installed on your system. > perl: warning: Falling back to the standard locale ("C"). > > This is starting to be a real pain in the neck. I'm getting a few > hundred of these warnings cluttering up some make logs under obsd. > > -wolfgang Note that this ought to work in about six months time. UTF8 support won't make OpenBSD 3.8, but I hope to commit it a little bit after that.
Re: perl: warning: Setting locale failed.
Wolfgang S. Rupprecht wrote: > What needs to be done to get perl on obsd to not gripe about > LC_CTYPE=en_US.UTF-8 ? I need the utf-8 setting for interoperability > with some other OS's that I'm doing cross-development work with. > > $ any-perl-script > perl: warning: Setting locale failed. > perl: warning: Please check that your locale settings: > LC_ALL = (unset), > LC_CTYPE = "en_US.UTF-8", > LANG = (unset) > are supported and installed on your system. > perl: warning: Falling back to the standard locale ("C"). > > This is starting to be a real pain in the neck. I'm getting a few > hundred of these warnings cluttering up some make logs under obsd. See http://archives.neohapsis.com/archives/openbsd/2005-04/1316.html > -wolfgang Kevin