如何使用挪威语iPhone?
我如何使用挪威字符在我的应用程序的 UILabel 中显示它们。
如果我直接使用它,它会显示垃圾值。
How can i use Norwegian characters to show them in UILabel in my application.
if i use it directly it shows garbage value.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
角色应该有效。我正在使用 UILabel,它从 nib 文件加载到 ViewController 的视图中。当我使用以下代码设置文本时,该标签适用于 Times New Roman 和 Palatino(可能还有其他字体):
[myLabel setText:@"ÆØÅ æøå"];
。我会尝试直接复制并粘贴该行,看看会发生什么。我猜想您是从某个地方获取字符,而该处的表示在
NSString
术语中不太正确。我从 维基百科 获取这些内容。 (我不会说挪威语,所以我不确定您是否需要其他非英语字母字符 - 据我所知,这些是唯一的字符。)The characters should work. I'm using a UILabel which loads from a nib file into the view of a ViewController. The label works in Times New Roman and Palatino (and presumably other fonts) when I set the text with the following code:
[myLabel setText:@"ÆØÅ æøå"];
. I would try copying and pasting that line directly and see what happens.I would guess that you're getting your characters from somewhere whose representation is not quite right in
NSString
terms. I grabbed these from Wikipedia. (I don't speak Norwegian so I'm not sure if you need other non-English alphabet characters - as far as I could see these were the only ones.)