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:  如何处理中文编码 

留言

搜尋

本月熱門文章

最近半年台中意外事故 66件

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

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

水電行介紹---台北市南港區研究院路二段30號的志興水電行---是水電行也是水電材料行

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

堪比林益世李朝卿的前台北市長柯文哲

中國國民黨政治人物參與中國共產黨統戰學習?

水電行介紹---台北市萬華區環河南路一段216號的光成水電材料行---我在修繕業的叢聚市場

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

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

Agoda

熱門文章

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

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

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

關於中國:202X年

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

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

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

[棒球] 2023 台灣大賽G5 威能帝13K飆破紀錄 猿3轟搶聽牌優勢