From owner-freebsd-sparc Fri Jan 3 4: 1: 8 2003 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 358BF37B406; Fri, 3 Jan 2003 04:01:05 -0800 (PST) Received: from amun.isnic.is (amun.isnic.is [193.4.58.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D788243E4A; Fri, 3 Jan 2003 04:01:02 -0800 (PST) (envelope-from oli@amun.isnic.is) Received: from amun.isnic.is (oli@localhost [127.0.0.1]) by amun.isnic.is (8.12.3/8.12.3/isnic) with ESMTP id h03C0vmV008088; Fri, 3 Jan 2003 12:00:57 GMT (envelope-from oli@amun.isnic.is) Received: (from oli@localhost) by amun.isnic.is (8.12.3/8.12.3/Submit) id h03C0vZL008087; Fri, 3 Jan 2003 12:00:57 GMT (envelope-from oli) Date: Fri, 3 Jan 2003 12:00:57 +0000 From: Olafur Osvaldsson To: freebsd-hackers@freebsd.org Cc: freebsd-sparc@freebsd.org Subject: Locale errors on 5.0-CURRENT (sparc) Message-ID: <20030103120057.GI74128@isnic.is> Mail-Followup-To: freebsd-hackers@freebsd.org, freebsd-sparc@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.28i X-Spam-Status: No, hits=-1.2 required=5.0 tests=SPAM_PHRASE_01_02,USER_AGENT,USER_AGENT_MUTT version=2.43-isnic Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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 #include 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