How to convert Unicode strings (\u00e2, etc) into NSString for display?

前端 未结 3 1430
日久生厌
日久生厌 2020-12-06 21:08

I am trying to support arbitrary unicode from a variety of international users. They have already put a bunch of data into sqlite databases on their iPhones, and now I want

3条回答
  •  -上瘾入骨i
    2020-12-06 21:40

    [...] there is no built-in Cocoa methods to convert [...]. Is this correct?

    It's not correct.

    You might be interested in CFStringTransform and it's capabilities. It is a full blown ICU transformation engine, which can (also) perform your requested transformation.

    See Using Objective C/Cocoa to unescape unicode characters, ie \u1234

提交回复
热议问题