Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Working with Unicode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working with Unicode



The backslash is regular ASCII (along with all Unicode points under U +0080). You shouldn't need to do anything special to use backslashes :)
"\r" is giving you trouble because it's being converted to a return character. Similar to "\n" actually.
What exactly is displaying "\\resign"? The debugger may be tricking you. If you actually printf the string, does it look correct?



On Mar 30, 2006, at 2:39 PM, Julio Cesar Silva dos Santos wrote:

Hello,

I am trying to work with some unicode characters, especially the '\' (backslash) and I thought it would be easy but it is not. Here what I tried:
1) Created a Localizable.strings file with the characters, for example MY_CONSTANT = "\resign";


2) When I load MY_CONSTANT it looks like " esign" (the space in fact becomes a new line)

3) Changed to MY_CONSTANT = "\U005Cresign". (5C is the code for \)

4) Now it looks like "\\resign".

5) Changed to MY_CONSTANT = "\U005C\U0072esign". (72 is the code for r)

6) Now it continues to look like "\\resign".

Well, is there a way that I can have MY_CONSTANT returning "\resign"? Or do I have to take another approach?

Thanks for any help,


Julio Cesar Santos email@hidden eMac 1GHz ComboDrive 640MB RAM Linux User #359973


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Working with Unicode (From: Julio Cesar Silva dos Santos <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.