gpt4 book ai didi

iphone - NSXMLParser 分解元音符号 (ä, ö, ü)

转载 作者:数据小太阳 更新时间:2023-10-29 02:16:04 28 4
gpt4 key购买 nike

我使用 NSXMLParser 来解析服务器的 XML 文档。它们被编码为 UTF8。我的问题是,NSXMLParser 在变音符 (ä, ö, ü) 处中断并开始一个新元素。

例如:

Lösen -- NSXMLParser ---> L + ösen

如何让 NSXMLParser 像所有其他单词一样完整地读取我的元音变音单词。

问候

最佳答案

抱歉,但根据您对原始问题的评论(foundCharacters 在两次调用中接收文本),解析器运行良好。请参阅下面引用的 parser:foundCharacters: 方法的“讨论”部分:

The parser object may send the delegate several parser:foundCharacters: messages to report the characters of an element. Because string may be only part of the total character content for the current element, you should append it to the current accumulation of characters until the element changes.

如您所见,解析器可以根据需要随意将字符分块传递给您的委托(delegate)。

关于iphone - NSXMLParser 分解元音符号 (ä, ö, ü),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1062086/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com