开发者

iphone sdk , apostrophe showing up as question mark

The q开发者_运维知识库uotation marks (apostrophe to be more specific) single and double are displaying as question mark on my text view.

The problem come up when I try to copy and paste some thing from a webpage and save it. This problem does not happen when I type the sentence. How can I replace a apostrophe with a regular single quote?


When you copy from a webpage you are not copying a plain old apostrophe. You are copying a fancy one that looks very similar but is not. Since the text view only displays plain text it cannot understand your fancy apostrophe.

When you copy from a webpage you will have to manually delete and retype the apostrophes.

You have to do a string replace probably with unicode characters. The following may be the characters that you want to replace:

Char   Unicode    HTML
“      8220        “     
‘      8216        ‘     
”      8221        ”     
’      8217        ’     
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜