RE: Any way to get 16-bit string literals?
RE: Any way to get 16-bit string literals?
- Subject: RE: Any way to get 16-bit string literals?
- From: Stéphane Beauchemin <email@hidden>
- Date: Mon, 5 Oct 2009 11:32:11 -0400
- Thread-topic: Any way to get 16-bit string literals?
Have you tried to use gcc or g++ option: -fwide-exec-charset=charset ?
Stephane
-----Original Message-----
From: xcode-users-bounces+sbeauchemin=email@hidden [mailto:xcode-users-bounces+sbeauchemin=email@hidden] On Behalf Of Ken Thomases
Sent: October-03-09 12:46 AM
To: Jens Alfke
Cc: XCode Users
Subject: Re: Any way to get 16-bit string literals?
On Oct 2, 2009, at 11:27 PM, Jens Alfke wrote:
> On Oct 2, 2009, at 5:12 PM, Jean-Denis Muys wrote:
>
>> Also copying a char[] array to a uint16_t[] array is likely not to
>> do what you expect.
>
> Oh, don't worry, I know all about character encoding conversion :)
> You're correct in general, but the string literals used in WebCore
> are all plain ascii. (They're mostly things like HTML and SVG tag
> names, and HTTP headers.)
What's done in the Wine sources isn't pretty, but it's straightforward
and gets the job done:
const uint16_t myString[] = {'H','e','l','l','o',',','
','W','o','r','l','d','!','\n',0};
After all, that is all that a string literal is, under the covers. :)
Cheers,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden