In Mac OS X 10.6.7...
Japanese charaters works in Terminal.app while AppleLocale is set to en_US, en_GB or ja_JP.
But if I do:
and Log out and Log in. Then Terminal.app will display whitespaces instead of the charaters, both if I cat a file or open it in vim.
To reproduce, in Terminal.app:
Vim displays the correct UTF-8 hex values while the cursor is under a japanese character and pressing "g8", but Terminal.app will not display the character.
If I do not use the swedish locale, the week number will be incorrect, while date(1) displays:
All Cocoa apps that uses week number will display 17 /except/ for swedish when they display 16. (For 23rd of April).
In Terminal.app:
I am not sure if there are any known workarounds or if I should file this as bugs to Apple?
Japanese charaters works in Terminal.app while AppleLocale is set to en_US, en_GB or ja_JP.
But if I do:
Code:
defaults write -globalDomain AppleLocale sv_SE
and Log out and Log in. Then Terminal.app will display whitespaces instead of the charaters, both if I cat a file or open it in vim.
To reproduce, in Terminal.app:
Code:
$ cat
馬鹿たれ
馬鹿たれ
<Control+D>
Vim displays the correct UTF-8 hex values while the cursor is under a japanese character and pressing "g8", but Terminal.app will not display the character.
If I do not use the swedish locale, the week number will be incorrect, while date(1) displays:
Code:
$ date -v2011y -v4m -v23d '+%U %V %W'
16 16 16
All Cocoa apps that uses week number will display 17 /except/ for swedish when they display 16. (For 23rd of April).
In Terminal.app:
Code:
$ gcc -xobjective-c -framework Foundation -
#import <Foundation/Foundation.h>
int
main(void)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSDate *date = [[NSDate alloc] initWithString:@"2011-04-23 00:00:00 +0100"];
NSDateFormatter *weekFormatter = [[NSDateFormatter alloc] init];
[weekFormatter setDateFormat:@"w"];
NSLog(@"%@", [weekFormatter stringFromDate:date]);
[pool drain];
return 0;
}
<Control+D>
$ defaults write -globalDomain AppleLocale en_GB
$ ./a.out
2011-04-24 16:51:52.956 a.out[49908:903] 17
$ defaults write -globalDomain AppleLocale sv_SE
$ ./a.out
2011-04-24 16:51:56.697 a.out[49928:903] 16
$ defaults write -globalDomain AppleLocale ja_JP
$ ./a.out
2011-04-24 16:52:02.432 a.out[49948:903] 17
I am not sure if there are any known workarounds or if I should file this as bugs to Apple?
Last edited: