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

留言

Google Search

推薦內容橫式

本月熱門文章

國民黨陳玉珍翁曉玲自肥條款 可望再出現連戰兩億公務員? 各種荒腔走板的陳玉珍、翁曉玲 真是令人傻眼

[FAANG面試] Amazon/AWS 領導力準則 14 Amazon Leadership Principles

悲痛!XREX區塊鏈金融犯罪調查師陳梅慧Miffy殞落,揭露虛擬貨幣犯罪背後的黑幕

中華民國國軍辛苦了 因應中共軍演努力監視

20241123 BoA : One's Own in TAIPEI 難得一見的BoA來台灣演出

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

金融犯罪調查專家陳梅慧 離奇車禍死亡 疑點整理

ASMR 自主性感官經絡反應 用ASMR 音樂/影片 來助眠? 篠田優 Shinoda Yui 的ASMR影片

常見詐騙案例犯罪手法及預防方式一覽表 (持續更新)

大學生暑假打工 新北市政府 109 年度 大專青年公部門暑期工讀計畫

這個網誌中的熱門文章

Android應用開發豆知識:利用 adb 安裝 apk 到裝置上

Android 中文輸入法 官方版 ! Gboard - Google 鍵盤 開始支援注音輸入啦

Google Play 推薦Android app 誠徵App排行榜

北京故宮首訪,一窺清宮秘史 大玉兒 & 甄嬛

[家教][社會觀察] 建中教我的事 沒上建中被父母親折磨? 在建中到底是如何 ...

[FAANG面試] Amazon/AWS 領導力準則 14 Amazon Leadership Principles

Acer ICONIA Smart S300 更新後越來越好 Acer也有出手機?!

[品質控制] 什麼是Sanity test ? 軟體測試常見名詞整理 包含不同部門的測試人員負責範圍

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