Re: No yet encrypted...
- From: Glus Xof <gtglus gmail com>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: gtkmm-list gnome org
- Subject: Re: No yet encrypted...
- Date: Mon, 5 Dec 2011 18:27:43 +0100
>> The problem, here, is that this code works fine with one-byte
>> characters string but breaks with multi-byte characters strings !
>
> It would help if you said what "breaks" means. Do you mean it throws a
> conversion exception? If so then:
>
> std::cout << Glib::ustring::compose("# %1", mess).raw()
> << std::endl;
Thanks, was that... !
> will probably work, but you need to consider your character encodings
> more carefully to cover all cases, as this is not of itself a robust
> solution. It would mean that the text you are putting into 'mess' is
> not in fact in utf-8 encoding, or you have done something else wrong
> like not calling std::locale::global(std::locale("")).
>
> What calling ustring::raw() would do here is suppress the implicit
> conversion into the locale encoding carried out by the operator<<()
> overload for Glib::ustring.
>
> Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]