Iphone UIPasteboard副本无法在Notes和Mail中正确粘贴
我使用以下代码将包含英语和希伯来语字符的文本字符串复制到UIPasteboard中Iphone UIPasteboard副本无法在Notes和Mail中正确粘贴,iphone,objective-c,ios,character-encoding,uipasteboard,Iphone,Objective C,Ios,Character Encoding,Uipasteboard,我使用以下代码将包含英语和希伯来语字符的文本字符串复制到UIPasteboard中 UIPasteboard *appPasteBoard = [UIPasteboard generalPasteboard]; appPasteBoard.persistent = YES; NSString *toCopy = [self.workingDvarTorah description]; [appPasteBoard setValue:toCopy forPasteboardType:(NSS
UIPasteboard *appPasteBoard = [UIPasteboard generalPasteboard];
appPasteBoard.persistent = YES;
NSString *toCopy = [self.workingDvarTorah description];
[appPasteBoard setValue:toCopy forPasteboardType:(NSString *)kUTTypeUTF8PlainText];
我已经实现了自己版本的描述方法,以复制相关数据,如下所示:
- (NSString *)description{
// Build a string from the tags
NSMutableString *tags = [[[NSMutableString alloc] init] autorelease];
BOOL isFirstTag = YES;
for (Tag *aTag in self.tags) {
// Add a comma where necessary, but make
// sure that we're not adding a comma to
// the beginning of the first tag.
if (isFirstTag) {
isFirstTag = NO;
[tags appendFormat:@" "];
}else{
[tags appendFormat:@", "];
}
[tags appendFormat:@"%@", aTag.tagText];
}
return [NSString stringWithFormat:@"%@ \n\n %@\n\n%@: %@", self.dvarTorahTitle, self.dvarTorahContent, NSLocalizedString(@"Tags", @""), tags];
}
文本复制到粘贴板上,但当我将其粘贴到便笺或邮件中时,某些字符(nameley The dagesh,unicode字符05BC)显示为一个框,而不是它应该显示的方式。我已经尝试了所有的文本UTI类型
我做错什么了吗?这是iOS还是Notes应用程序中的错误
除了去掉有问题的字符,我还能做些什么来纠正这个问题呢?,有两种希伯来文字符的表示形式,其中有dagesh。显然,存在一个组合字符和由两个交替字符组成的交替表示。创建我的初始数据文件的程序可能使用了组合字符。如果再次导出数据时没有组合字符,则复制粘贴工作正常
因此,似乎存在某些Notes和Mail for iOS不支持的字符