iOS URL decode 及 encode

在開發過android 現在改開發iOS,在文件上,真的iOS做得比android好很多。像是 About iOS App Programming
而關於iOS URL decode 及 encode的討論。其中什么是url encode参见 http://www.stringfunction.com/url-decode.html

官方文件

Understanding characters

A string object presents itself as an array of Unicode characters (Unicode is a registered trademark of Unicode, Inc.). You can determine how many characters a string object contains with the length method and can retrieve a specific character with the characterAtIndex: method. These two “primitive” methods provide basic access to a string object.
Most use of strings, however, is at a higher level, with the strings being treated as single entities: You compare strings against one another, search them for substrings, combine them into new strings, and so on. If you need to access string objects character by character, you must understand the Unicode character encoding, specifically issues related to composed character sequences. For details see The Unicode Standard, Version 4.0 (The Unicode Consortium, Boston: Addison-Wesley, 2003, ISBN 0-321-18578-1) and the Unicode Consortium web site: http://www.unicode.org/. See also “Characters and Grapheme Clusters” in String Programming Guide.

Interpreting UTF-16-encoded data

When creating an NSString object from a UTF-16-encoded string (or a byte stream interpreted as UTF-16), if the byte order is not otherwise specified, NSString assumes that the UTF-16 characters are big-endian, unless there is a BOM (byte-order mark), in which case the BOM dictates the byte order. When creating an NSString object from an array of Unicode characters, the returned string is always native-endian, since the array always contains Unicode characters in native byte order.
今天最重要的是介紹大絕招 stringByReplacingPercentEscapesUsingEncoding

參見 将UTF8编码转化为中文

others:  如何处理中文编码 

留言

搜尋

本月熱門文章

新鮮人找工作:職場名詞解釋 AE FAE Pre-sales Post-sales

日本旅行 去東京可以在哪邊買羽球相關用品?WEMBLEY/WINDSOR/梭家/Victoria/Alpen TOKYO/

什麼是Sanity test ? 軟體測試常見名詞整理

水電行介紹---台北市北投區致遠二路113巷7號的揚明水電行‎—在地老店,水電服務的好鄰居

水電行介紹---台北市松山區延吉街的廣泰水電行—在地經營水電行,來電預約跨區跑也OK啦~

廚具水電行—呼叫臺北市內湖區民權東路6段56巷1弄2號的永輝水電衛浴廚具行 –有廚浴, 衛浴展示空間喔!

水電行介紹---台北市大同區重慶北路二段101號的永發水電行---公車直達的水電行!

水電行介紹---台北市萬華區東園街47號的正泰水電裝潢行---水電廚具衛浴找我就對啦!

水電行介紹---臺北市大同區歸綏路197號1樓的新雅水電行---32歲的在地水電行。

水電材料行介紹---臺北市大同區寧夏路75號的順利電料有限公司 ---在地經營二十四年的水電材料行,請大家繼續支持!

Agoda

熱門文章

[社會觀察] 一生順遂與命途乖舛

中華民國2024 總統、副總統選舉公告發布 連署參選門檻28萬9667人 可以推薦候選人的政黨包括民進黨、國民黨、民眾黨和時力

關於中國:202X年

[FAANG面試] 如何準備Google Technical Program Manager (TPM) 面試

[HMD Global] Nokia 2020 新手機發布 首款 5G 手機 Nokia 8.3 預計夏季開賣 !

新鮮人找工作:職場名詞解釋 AE FAE Pre-sales Post-sales

日本旅行 去東京可以在哪邊買羽球相關用品?WEMBLEY/WINDSOR/梭家/Victoria/Alpen TOKYO/

[音樂] 霖霖 新單曲:給你了

[表特][Passion Sisters] 中信兄弟PS女孩 浮誇甜心 凱蒂 炸裂全場~ 小許瑋甯