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

Comments

搜尋

本月熱門文章

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

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

中國三無非法漁船四處衝撞,為了捕魚、走私還是偷渡?影響中華民國國家安全

1980年蔣經國時代的228事件 林宅血案

水電行介紹---台北市中正區杭州南路一段 143巷 35號的統賀水電工程行--請上我個人網站找我喔~

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

台灣人在韓國旅遊該用哪一個map??

2012全新 5945呼叫師傅 幫你找好師傅!

生研 暑訓 day 3

許多深藍人士懷念的兩蔣時代

Agoda

熱門文章

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

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

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

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

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

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

關於中國:202X年

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

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

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