locale problems with STL (C++)

Ruben Pollan meskio at sindominio.net
Thu Jul 1 09:39:02 UTC 2010

I see no one in this list knows about that topic. Do someone knows where I can
ask? Are there another mailing list more focused on programming problems?

Thank you.

On 22:02, Sun 20 Jun 10, Ruben Pollan wrote:
> Hello,
> I'm new user of FreeBSD, using it as a desktop since a week. I develop an small
> 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 without
> segfault. But don't works with wide characters. I'm using locale to read files
> encoded on the local charset, like:
> wifstream file;
> file.imbue(locale(""));
> file.open(path);
> ...
> This code reads wrongly the wide characters. My system locale is:
> [meskio at blackspot:~]$ echo $LANG
> es_ES.UTF-8
> Am I missing something? I still don't understand well how locale works on C++, it 
> 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 freebsd,
> needs devel/stlport: http://gitorious.org/tudu/tudu
> [2] http://gcc.gnu.org/ml/libstdc++/2005-04/msg00021.html

Rubén Pollán  | jabber:meskio at jabber.org
Veo a un Mickey Mouse envejecido con 
pasamontañas tirando piedras a una oficina de 
disney al grito, "Fui vuestro esclavo desde 
1928 y he conquistado para vosotros millones 
de corazones y ganado billones de dólares, 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100701/f2d00906/attachment.pgp

More information about the freebsd-questions mailing list