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: Ken Thomases <email@hidden>
- Date: Fri, 2 Oct 2009 23:46:10 -0500
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