objective c - How to convert a NSString to UTF-8 format string in iphone sdk? -


Localization is in my app (English, Spanish, Italian). The client sent me a string file but how are some characters funny? Do I correct them? I have thought that the client has used Mac OS Roman encoding, how do I change it in UTF-8? For example, Nuremberg is converted to NTRNberg, when the client sends me, I want to do it again.

You have a property file with all the strings ... you can load them and in these You can read them with any one (from):

InitWithBytes: Length: Encoding: - initWithBytesNoCopy: Length: Encoding: Free When Don: - initWithCString: Encoding: --initWithUTF8 String:

Here is the list of all possible encodings

  enum {NSASCIIStringEncoding = 1, NSNEXTSTEPStringEncoding = 2, NSJPany EUC string encoding = 3, NSUFF 8 str Egg encoding = 4, & lt; ----- UTF 8! NsisolatinlStringEncoding = 5, Nssymbolstringencoding = 6, Nsnolossyaskistritrgnkoding = 7, Nsshiftjisstringencoding = 8, Nsisolatin2StringEncoding = 9, Nsunikodestringencoding = 10, Nsvindovskpl25lStringEncoding = 11, Nsvindovskpl252StringEncoding = 12, Nsvindovskpl253StringEncoding = 13, Nsvindovskpl254StringEncoding = 14, Nsvindovskpl250StringEncoding = 15, Nsiso2022JPStringEncoding = 21, Nsmksromanstringencoding = 30, Nsutfal6StringEncoding = Nsunikodestringencoding, Nsutfal6BigEndianStringEncoding = 0x90000100, Nsutfal6LittleEndianStringEncoding = 0x94000100, Nsutfa32StringEncoding = 0x8c000l00, Nsutfa32BigEndianStringEncoding = 0x98000100, Nsutfa32LittleEndianStringEncoding = 0x9c000l00, Nspropriattristringencoding = 65536};  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -