1
WINAPI에는 유니 코드 호스트 이름을 Punycode로 변환하는 메소드가 있습니다. Cocoa/Cocoa Touch도 비슷한 메커니즘을 가지고 있습니까?Cocoa의 CFHost는 IDN을 지원합니까?
WINAPI에는 유니 코드 호스트 이름을 Punycode로 변환하는 메소드가 있습니다. Cocoa/Cocoa Touch도 비슷한 메커니즘을 가지고 있습니까?Cocoa의 CFHost는 IDN을 지원합니까?
체크 아웃 SBPunyCode (업데이트 링크)
외부 라이브러리없이 작동 조금 해킹있다. 당신이 에서 유니 코드 URL이 theUrl 한 가정, 당신은 할 수 없다 :
NSURL *urlToLoad = nil;
NSPasteboard * pasteboard = [NSPasteboard pasteboardWithName:@"RandomPB"];
[pasteboard declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
@try
{
if ([pasteboard setString:theUrl forType:NSStringPboardType])
urlToLoad = [WebView URLFromPasteboard:pasteboard];
}
@catch (NSException * exception)
{
urlToLoad = nil;
NSLog(@"Can't create URL from string '%@'.", theUrl);
}
return urlToLoad;
을 따라서, 네이티브 지원을? – Plumenator