• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Any way to get 16-bit string literals?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • RE: Any way to get 16-bit string literals?
      • From: Stéphane Beauchemin <email@hidden>
    • Re: Any way to get 16-bit string literals?
      • From: Jens Alfke <email@hidden>
References: 
 >re: Any way to get 16-bit string literals? (From: Jean-Denis Muys <email@hidden>)
 >Re: Any way to get 16-bit string literals? (From: Jens Alfke <email@hidden>)
 >Re: Any way to get 16-bit string literals? (From: Ken Thomases <email@hidden>)

  • Prev by Date: [MEETING] Toronto Area Cocoa & WebObjects Developer Group - October 13
  • Next by Date: Re: Any way to get 16-bit string literals?
  • Previous by thread: Re: Any way to get 16-bit string literals?
  • Next by thread: Re: Any way to get 16-bit string literals?
  • Index(es):
    • Date
    • Thread