Re: Can't write ustring to std::cout [Was: Re: string problems]



Murray Cumming schrieb:

>> std::string linetmp;
>> std::getline(source, linetmp);
>> line = Glib::locale_to_utf8(linetmp);
>> std::cout << line << "\n";
>>
>> fails in the call to Glib::locale_to_utf8.
>> here's the output of locale:
>> LANG=de_DE.UTF-8
>> LC_CTYPE="de_DE.UTF-8"
>> LC_NUMERIC="de_DE.UTF-8"
>> LC_TIME="de_DE.UTF-8"
>> LC_COLLATE="de_DE.UTF-8"
>> LC_MONETARY="de_DE.UTF-8"
>> LC_MESSAGES="de_DE.UTF-8"
>> LC_PAPER="de_DE.UTF-8"
>> LC_NAME="de_DE.UTF-8"
>> LC_ADDRESS="de_DE.UTF-8"
>> LC_TELEPHONE="de_DE.UTF-8"
>> LC_MEASUREMENT="de_DE.UTF-8"
>> LC_IDENTIFICATION="de_DE.UTF-8"
>> LC_ALL=
>>
>> So everything should be UTF-8 (I can display the file with the
>> problematic line ";add	𝔐, v1, v2" with cat, edit it in gedit, etc).
> 
> I guess it's not in locale encoding. What does the exception message
> say?

"Invalid byte sequence in conversion input"

> Note that I see a square in that string in Evolution. 

gucharmap says it's U+1D510 MATHEMATICAL FRAKTUR CAPITAL M. I installed
nearly all the fonts Debian unstable has to offer and it's one of the
two characters in the whole mathematical fraktur alphabet I can now view
in X11.

Philipp





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