I'm fairly certain my problem here is that I wasn't thinking about unicode
terms here.
What we are trying to do:
Shorten the AM/PM to just the first character in Western Languages so that a
time is shown as "1:30a".
NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
NSString* am = [[[formatter AMSymbol] substringToIndex:1]
lowercaseString];
NSString* pm = [[[formatter PMSymbol] substringToIndex:1]
lowercaseString];
This works in Western languages just fine. However in languages like Korean it
does not work giving a random character seemingly. From reading on this list
over time I believe its because I'm just getting one part of a multi-part
character (I'm no good with unicode terms sorry).
My guess is I need to use rangeOfComposedCharacterSequenceAtIndex and then get
the range and use a substring with that range. But I'm not sure since my
knowledge here is pretty limited. Would love some direction.
Thanks!_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]