NSString *searchString = @"Lyngbø";
NSLog("%@",[searchString stringByAddingPercentEscapeUsingEncoding:NSUTF8StringEncoding]);
It gives me: Lyng% C3% B8
<script type="text/javascript">
document.write(escape("Lyngbø"));
</script>
It gives me: Lyngb% F8
The search engine I'm developing with does not understand the Objective-C method of encoding a string and returns nothing when searching for words containing either æ. ø or å
source
share