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

搜尋

本月熱門文章

什麼是 OTA ?

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

台灣及日本航空公司 那些還有波音737-800機型

水電行介紹--台北市萬華區中華路二段410號的健裕水電行—在地水電服務的小商家

[專案管理] 敏捷提到的"資訊散熱器"(Information Radiator)是甚麼?

水電行介紹---台北市中山區吉林路337號的維軒水電行—我就在HONDA維修場的旁邊!

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

[專案管理] 品質管理中的管制圖及USL, UCL, LCL, LSL 等定義

威聯通專為機器學習打造 TS-2888X AI-Ready NAS,提供巨量資料儲存空間結合高速運算的一站式 AI NAS 解決方案

水電行介紹---台北市松山區八德路三段158巷20弄13號的建美水電行‎—小型在地的水電行,附近好多競爭者喔~

Agoda

熱門文章

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

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

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

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

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

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

關於中國:202X年

什麼是 OTA ?

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

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