tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: C++ and locales



In article <20090109112837.GA3967%quartz.inf.phy.cam.ac.uk@localhost>,
Patrick Welche  <prlw1%cam.ac.uk@localhost> wrote:
>I have just spent an interesting time trying to work out why
>
>       #include <iostream>
>       #include <locale>
>
>       using namespace std;
>
>       int main()
>       {
>               locale loc("en_GB.UTF-8");
>               cout.imbue(loc);
>       
>               cout << "Hello world!" << endl;
>
>               return 0;
>       }
>
>coredumps on NetBSD but works (en_GB.utf8) on ubuntu.
>
>The core points at
>  src/gnu/dist/gcc4/libstdc++-v3/config/locale/generic/c_locale.cc
>    // Currently, the generic model only supports the "C" locale.
>    // See http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html
>
>So, how do you use locales under NetBSD? (I was hoping for codecvt)

It does not look possible using the c++ api's.

christos



Home | Main Index | Thread Index | Old Index