我有一個Unicode字符串作爲轉換Unicode字符串到的NSString
{\rtf1\ansi\ansicpg1252\cocoartf1265
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{check\}}{\leveltext\leveltemplateid1\'01\uc0\u10003 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\paperw11900\paperh16840\margl1440\margr1440\vieww22880\viewh16200\viewkind0
\pard\li720\fi-720\pardirnatural
\ls1\ilvl0
\f0\fs24 \cf0 {\listtext
\f1 \uc0\u10003
\f0 }One\
{\listtext
\f1 \uc0\u10003
\f0 }Two\
}
在這裏,我有Unicode數據\ u10003這相當於 「✓」 字。我已經使用 [NSString stringWithCharacters:「\ u10003」長度:NSUTF16StringEncoding]這是拋出編譯錯誤。請讓我知道如何將這些unicode字符轉換爲「✓」。
問候, 轟
你做了Google ..?這裏是一個asnwer [轉換Unicode字符爲NSString](http://stackoverflow.com/questions/12090585/convert-unicode-character-to-nsstring) –
對不起,我沒有得到任何東西在谷歌這一點。他們大多數有四位數字,這裏我們有五個數字。 – boom
這就是[RTF](http://en.wikipedia.org/wiki/Rich_Text_Format)。你想用它做什麼? –