Re: ustring::compose and win32



Le jeudi 19 mai 2011 à 16:05 +0100, Harry Van Haaren a écrit :
> Oh, its at runtime your getting this message?
> That changes things a little. 
> 
> 
> I've just read the docs on ustring::compose() here:
> http://developer.gnome.org/glibmm/unstable/classGlib_1_1ustring.html#a0fd0cec75e3dbce9faeb58da5af64f97
> 
This is a runtime exception.
A Glib::ConvertError with this message : "La conversion du jeu de
caractères « WCHAR_T » vers « UTF-8 » n'est pas prise en charge" in
what().

I attached a sample. Throws at line 7 under windows, works under Linux.

-- 
Bastien Durel
#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
	Glib::ustring s = Glib::ustring::compose("str: %1", (const char*)"string");
	std::cerr << "string: " << s << std::endl;
	s = Glib::ustring::compose("int: %1", 42);
	std::cerr << "int: " << s << std::endl;
	int k;
	std::cout << "press enter."; std::cout.flush();
	std::cin >> k;
	return 0;
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]