1

在调用foursquare API的iOS应用程序中处理unicode字符的正确方法是什么?

我们当前的设置从我们的 iOS 应用程序调用foursquare API,并返回XML(是的,我们将其更改为JSON)。

在测试我们的应用程序时,我们发现这个四边形位置对我们的应用程序造成了严重影响——显然是因为我们没有设置来处理场地名称中的两个表情符号字符。

在每个级别处理 unicode 字符的正确方法是什么?

在Objective-C中,我们称之为foursquare API?在我们的 WCF Web 服务中,当我们将 XML 数据返回给应用程序时?在 SQL Server 2008 中,当我们存储可能包含 unicode 字符的地名时?

在数据库方面,我知道我们需要对排序规则设置进行一些更改,等等。

在我们的 iOS 应用程序和 Web 服务中正确支持 unicode 6.1 需要哪些更改(如果有)?

谢谢!

4

1 回答 1

0

I'm guessing you are trying to convert a unicode string to another encoding then back to unicode. If the converter doesn't know what the unicode character is then it could do something strange(e.g. the converter might convert one of the new sad pussycat emoji characters to a square root sign).

This might happen without you explicitly doing it depending on how you have your database setup, the XML encoding you use, your HTTP server configuration, etc.

Unicode 6.1 just adds characters, the encoding is exactly the same(i.e. some codes that didn't map to anything now map to things).

于 2012-07-04T21:44:58.350 回答