tech-toolchain archive

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

C++ and locales



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)

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index