From owner-freebsd-questions@FreeBSD.ORG Sun Jun 20 20:21:12 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BC74106566B for ; Sun, 20 Jun 2010 20:21:12 +0000 (UTC) (envelope-from meskio@noblezabaturra.org) Received: from heal.cauterized.net (heal.cauterized.net [89.140.131.167]) by mx1.freebsd.org (Postfix) with ESMTP id 393DC8FC08 for ; Sun, 20 Jun 2010 20:21:11 +0000 (UTC) Received: from localhost (AAnnecy-552-1-237-115.w83-197.abo.wanadoo.fr [83.197.245.115]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by heal.cauterized.net (Postfix) with ESMTPSA id 53A9C7016044 for ; Sun, 20 Jun 2010 22:02:54 +0200 (CEST) Date: Sun, 20 Jun 2010 22:02:52 +0200 From: Ruben Pollan To: freebsd-questions@freebsd.org Message-ID: <20100620200252.GA2030@blackspot> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: locale problems with STL (C++) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2010 20:21:12 -0000 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I'm new user of FreeBSD, using it as a desktop since a week. I develop an s= mall ncurses tool for manage todo lists[0]. Up to now I just used on GNU/Linux systems. I'm trying to compile it on FreeBSD, my original Makefiles seems to be too linux-like. I manage to compile it[1], but I have some problems with STL. I= read that there is a bug on libstdc++ and the locale[2] and gives a segfault, it seems to be still there. I try to compile it with stlport, it compiles without problems and runs wit= hout segfault. But don't works with wide characters. I'm using locale to read fi= les encoded on the local charset, like: wifstream file; file.imbue(locale("")); file.open(path); =2E.. This code reads wrongly the wide characters. My system locale is: [meskio@blackspot:~]$ echo $LANG es_ES.UTF-8 Am I missing something? I still don't understand well how locale works on C= ++, it=20 worked well on GNU/Linux. Any suggestion? Thank you. [0] http://cauterized.net/~meskio/tudu/ [1] I have a branch 'freebsd' on the git repository that compiles on freebs= d, needs devel/stlport: http://gitorious.org/tudu/tudu [2] http://gcc.gnu.org/ml/libstdc++/2005-04/msg00021.html --=20 Rub=E9n Poll=E1n | jabber:meskio@jabber.org -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D- Veo a un Mickey Mouse envejecido con=20 pasamonta=F1as tirando piedras a una oficina de=20 disney al grito, "Fui vuestro esclavo desde=20 1928 y he conquistado para vosotros millones=20 de corazones y ganado billones de d=F3lares,=20 =A1AHORA DEJADME SER LIBRE!" --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkwec+sACgkQGKOQ92SwNMLa5QCggEB4LYyXCbt9bSwCsfRcmqOU W+UAmgNgPbnZ0vek7TDbJ2yaQ3dZpdUO =QG8I -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--