gpt4 book ai didi

ios - iOS如何解码ISO6937编码的文本?

转载 作者:行者123 更新时间:2023-12-01 16:33:48 25 4
gpt4 key购买 nike

我正在实现电视解析器软件。

在捷克语中,我发现EPG由 ISO6937 编码。

我使用以下API解码并切换到NSString

- (instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding;

但我找不到编码ENUM。 CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatin2)不正确。

有人可以帮助我吗?

最佳答案

如果您提到的编码不起作用,请尝试以下以下编码

CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingMacCentralEurRoman)

要么
NSISOLatin2StringEncoding

还要检查 this帖子。

编辑

这是iOS8.3支持的编码列表。负责任地尝试。
NSASCIIStringEncoding = 1,      /* 0..127 only */
NSNEXTSTEPStringEncoding = 2,
NSJapaneseEUCStringEncoding = 3,
NSUTF8StringEncoding = 4,
NSISOLatin1StringEncoding = 5,
NSSymbolStringEncoding = 6,
NSNonLossyASCIIStringEncoding = 7,
NSShiftJISStringEncoding = 8, /* kCFStringEncodingDOSJapanese */
NSISOLatin2StringEncoding = 9,
NSUnicodeStringEncoding = 10,
NSWindowsCP1251StringEncoding = 11, /* Cyrillic; same as AdobeStandardCyrillic */
NSWindowsCP1252StringEncoding = 12, /* WinLatin1 */
NSWindowsCP1253StringEncoding = 13, /* Greek */
NSWindowsCP1254StringEncoding = 14, /* Turkish */
NSWindowsCP1250StringEncoding = 15, /* WinLatin2 */
NSISO2022JPStringEncoding = 21, /* ISO 2022 Japanese encoding for e-mail */
NSMacOSRomanStringEncoding = 30,

NSUTF16StringEncoding = NSUnicodeStringEncoding, /* An alias for NSUnicodeStringEncoding */

NSUTF16BigEndianStringEncoding = 0x90000100, /* NSUTF16StringEncoding encoding with explicit endianness specified */
NSUTF16LittleEndianStringEncoding = 0x94000100, /* NSUTF16StringEncoding encoding with explicit endianness specified */

NSUTF32StringEncoding = 0x8c000100,
NSUTF32BigEndianStringEncoding = 0x98000100, /* NSUTF32StringEncoding encoding with explicit endianness specified */
NSUTF32LittleEndianStringEncoding = 0x9c000100 /* NSUTF32StringEncoding encoding with explicit endianness specified */

关于ios - iOS如何解码ISO6937编码的文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30096559/

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