mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 17:27:39 +02:00
See https://stackoverflow.com/questions/720052/nslog-incorrect-encoding. The `%s` format placeholder for `NSLog()` expects an encoding other than UTF-8, which leads to garbled Unicode characters when trying to print a UTF-8 encoded string. ```Objective-C NSLog(@"Ä %s %@", "Ä", @("Ä")); ``` prints `Ä √Ñ Ä`. As can be seen in the example above, the workaround is to convert the UTF-8 encoded C-string to an `NSString` object and print that instead. `debug_key()` calls `NSLog()`.
74 KiB
74 KiB