On Tue, 10 Jul 2012 16:17:30 +0200, NtVisigoth <ntvisigoth@gmail.com> wrote:Hi,
I written another proba-project:
const std::string strLanguagesPath(
"g:\\source\\boost_locale\\languages\\" );
const std::string strLanguageFilename( "messages" );
const std::string strEnLanguage( "en_US.UTF-8" );
const std::string strRuLanguage( "ru_RU.UTF-8" );
int main( int argc, char * argv[] )
{
using namespace std;
using namespace boost::locale;
int exitCode = EXIT_SUCCESS;
try
{
generator gen;
gen.add_messages_path( strLanguagesPath );
gen.add_messages_domain( strLanguageFilename );
cout << "Start Boost.Locale proba" << endl;
std::locale en_loc = gen( strEnLanguage );
wcout << TREX( L"hello world", en_loc ) << endl;
std::locale ru_loc = gen( strRuLanguage );
wcout << TREX( L"hello world", ru_loc ) << endl;
cout << "Stop Boost.Locale proba" << endl;
I have very little experience with locales, but would note few things here:
1) You're using wcout for UTF-8 - that's not legal, at least in gcc world (have no dev win machine under hand)
2) what's TREX macro? Please always provide full test case.
3) May it be that your console cannot output non-ASCII symbols? Look at the string in debugger just to be sure.
-- Slava
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users