Date: Fri, 3 Jan 2003 12:00:57 +0000 From: Olafur Osvaldsson <oli@isnic.is> To: freebsd-hackers@freebsd.org Cc: freebsd-sparc@freebsd.org Subject: Locale errors on 5.0-CURRENT (sparc) Message-ID: <20030103120057.GI74128@isnic.is>
next in thread | raw e-mail | index | archive | help
Hi, I'm having some problems with seting the locale on 5.0 wich I have set up on sparc hardware...I'm pretty sure this is not sparc related but if so please correct me. On all my intel machines (4.*) I set the lang and locale by adding the following to the default section in /etc/login.conf: :charset=ISO-8859-1:\ :lang=is_IS.ISO_8859-1:\ and adding "LC_ALL=is_IS.ISO8859-1" to the setenv line. This seems to have no effect on the 5.0 system as I get locale errors when running any locale dependant programs... When running man I get: ctype locale: Invalid argument When running perl I get: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = "is_IS.ISO8859-1", LANG = "is_IS.ISO8859-1" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). So I made a simple program to see if I could set the locale to what I wanted. ================================================= #include <stdio.h> #include <locale.h> main(argc, argv) int argc; char *argv[]; { printf("setlocale(LC_ALL, \"%s\") returns: %s\n",argv[1],setlocale(LC_ALL, argv[1])); printf("setlocale(LC_TIME, \"%s\") returns: %s\n",argv[1],setlocale(LC_TIME, argv[1])); printf("Testing: [áíóðþæö]\n"); return 0; } ================================================= When run on the 5.0 system: # ./locale-test is_IS.ISO8859-1 setlocale(LC_ALL, "is_IS.ISO8859-1") returns: (null) setlocale(LC_TIME, "is_IS.ISO8859-1") returns: is_IS.ISO8859-1 Testing: [áíóðþæö] But when run on a 4.7-STABLE system it goes like this: # ./locale-test is_IS.ISO8859-1 setlocale(LC_ALL, "is_IS.ISO8859-1") returns: is_IS.ISO8859-1 setlocale(LC_TIME, "is_IS.ISO8859-1") returns: is_IS.ISO8859-1 Testing: [áíóðþæö] The is_IS.ISO8859-1 locale is the same on both systems and I get the same error when trying to set en_US.ISO8859-1 but if I try C it works fine on the 5.0 system: # ./locale-test C setlocale(LC_ALL, "C") returns: C setlocale(LC_TIME, "C") returns: C Testing: [áíóðþæö] I think there is some problem there but I don't have a free intel system to test if 5.0 behaves the same there as on the sparc system. I hope this all makes sense to someone else than just me. /Oli -- Olafur Osvaldsson Systems Administrator Internet a Islandi hf. Tel: +354 525-5291 Email: oli@isnic.is To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030103120057.GI74128>