On Sun, 2007-12-09 at 11:13 -0500, Onur Tugcu wrote:
> Thank you,
>
> You're right. Most of the confusion was from my failed test on ucs4.
> I thought I wrote that code below and it threw an exception on linux.
> But apparently I was wrong, or missed something in the code.
>
> Now it is simply:
>
Thank you,
You're right. Most of the confusion was from my failed test on ucs4.
I thought I wrote that code below and it threw an exception on linux.
But apparently I was wrong, or missed something in the code.
Now it is simply:
#include
#include
#include
#include
#include
#include
templa
On Sat, 2007-12-08 at 18:20 -0500, Onur Tugcu wrote:
> On Dec 8, 2007 5:55 PM, Chris Vine <[EMAIL PROTECTED]> wrote:
> > On Sat, 2007-12-08 at 12:24 -0500, Onur Tugcu wrote:
> >
> > > To me, easiest would be to be able to write unicode directly
> > > into code and to not worry about the codes. Also
On Sat, 2007-12-08 at 12:24 -0500, Onur Tugcu wrote:
> To me, easiest would be to be able to write unicode directly
> into code and to not worry about the codes. Also, I imagine
> multi-byte glyphs will suffer from endianness.
No, UTF-8 is composed of a series of characters (a narrow codeset), so
-- Forwarded message --
From: Onur Tugcu <[EMAIL PROTECTED]>
Date: Dec 8, 2007 12:22 PM
Subject: Re: wide char string literals to Glib ustring
To: Armin Burgmeier <[EMAIL PROTECTED]>
On Dec 8, 2007 7:43 AM, Armin Burgmeier <[EMAIL PROTECTED]> wrote:
>
>
On Sat, 2007-12-08 at 07:03 -0500, Onur Tugcu wrote:
> Hi,
> I'm writing my strings hardcoded into the program, so I want to make
> use of string literals in C++.
I think the easiest thing to do is not to use wchar_t at all but
directly encode the string literals in UTF-8.
> When I use gtkmm wit
Hi,
I'm writing my strings hardcoded into the program, so I want to make
use of string literals in C++.
When I use gtkmm with vc++ 2005, sizeof(wchar_t) is 2.
So I assumed utf-16 encoding and wrote:
Glib::ustring w2ustring(std::wstring const &w)
{
gunichar2 const* utf16= reinterpret_cast(w.c_str