|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Perl locale
Hi guys,
Whenever I run a Perl program or Perl itself, I see this warning message: Code:
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"). Code:
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = en_US.UTF-8, LC_CTYPE = "en_US.UTF-8", LANG = (unset) are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). |
|
|||
OP here, I forgot my password last time.
The problem is that I was using UXTerm, which sets LC_CTYPE. I now instead do “xterm -en utf8”—well, actually “XTerm*locale: utf8” is in my .Xdefaults, but they’re the same thing. OpenBSD really is a learning experience perllocale(1) |
|
||||
For one, there is no UTF-8 support at the OS level on OpenBSD.
There are UTF-8 /usr/share/locale directories which are empty, hence fallback to C, but this prevent error messages. For the LC_ALL=C fallback, in the LInux days when they were adapting UTF-8, I used to set the environment to it. Under OpenBSD default ksh, I often type env LC_ALL=C [command] [arguments] which does nothing but prevent error messages. You would set those variables in ~/.profile Usually (other OSes), the system wide setting would happen in /etc/login.conf but as assumption is the mother of all f#ck-ups, checked the manpages and found no indication. Hence, no answer. I cover my back Also, don't su but sudo and, in the /etc/sudoers uncomment (visudo) #Defaults:%wheel !env_reset This would be OK for a one-only sysadmin system. One of the reasons to use Xorg (/usr/X11R6/share/X11/locale) and UTF-8 aware applications. Btw, you perfectly can save a file (OS file-system level), with UTF-8 characters in it (application level): UTF-8 aware aplications read it perfectly but the CLI will strip some characters. Just be aware that the CLI shells (OS level) will not do the translation. Note that this also happens when the filenames have extended ASCII you would read differently under Xorg and the CLI if not set to the same locales|xlocales. Using OpenBSD as a desktop for some years now, I don't know anymore how mendatory a full UTF-8 support from the OS level up would be vs. keeping the OS in full old plain trusted ASCII-7.
__________________
da more I know I know I know nuttin' |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
perl expression syntax | qsecofr | Programming | 3 | 16th February 2009 12:56 PM |
Reformatting ftp listings with awk and perl | J65nko | Guides | 0 | 24th December 2008 03:04 AM |
Learning Perl | mtx | Book reviews | 7 | 22nd October 2008 05:55 PM |
perl/tk | bsdnewbie999 | OpenBSD Packages and Ports | 4 | 8th August 2008 12:34 AM |
Perl Script | c0mrade | Programming | 1 | 26th June 2008 05:04 AM |