Re: AM/PM letter UNICODE issues

2010-10-18 Thread Gerriet M. Denkmann
On 19 Oct 2010, at 00:54, Alex Kac wrote: > NSDateFormatter* formatter = [[NSDateFormatter alloc] init]; > NSString* am = [[[formatter AMSymbol] substringToIndex:1] > lowercaseString]; Please note that substringToIndex does only sometimes return a valid string. I just tried: NSS

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Todd Dombrowski
Here's one way to accomplish your stated goal: -- BEGIN CODE -- #import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // NSDateFormatter, locale friendly NSDateFormatter *df = [[NSDateFormatter alloc] init]; [df setDateSt

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Aki Inoue
Alex, Uli is giving very helpful recommendations here. The leave-the-first-character logic doesn't work for Korean and Japanese, either. They happen to spell AM/PM like MA/MP as Quincey warned. If you have specific target locales in mind, I recommend providing a set of formatting configuratio

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Uli Kusterer
On 18.10.2010, at 21:08, Alex Kac wrote: > That all said, everything everyone said is true here about this not being a > one-size fits all solution. Its not meant to be. That's the one reason I tend > not to post here much - I feel like sometimes I have to give everyone a full > design doc along

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Uli Kusterer
On 18.10.2010, at 20:49, Alex Kac wrote: > Yes, we already take care of the 24 hour situation. This is explicitly for > people who are showing their times using AM/PM. Not that its an iron-clad > thing either, but we've been doing calendaring for over 10 years now so I'm > aware of the date/time

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Alex Kac
I actually attended that session - so thanks for reminding me about it. I should add I have worked with unicode, asian languages, etc.. on other platforms for many years and am aware of the complexities (though I've been working on the Mac since 1992 and Cocoa since 2007). Its not so much eye-o

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/18/10 10:19 AM, Alex Kac wrote: > 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 > o

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Alex Kac
Right, our goal is not to make this a universal solution. Just one for the languages we know and support. Thanks. Appreciate the help. On Oct 18, 2010, at 1:47 PM, Quincey Morris wrote: > It's not obvious that taking the first grapheme is going to be semantically > meaningful in every language

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Alex Kac
Right - some don't. We do take care of those situations. But many do and its nice to get that from OS itself. On Oct 18, 2010, at 1:48 PM, A.M. wrote: > > On Oct 18, 2010, at 2:41 PM, glenn andreas wrote: > >> >> On Oct 18, 2010, at 12:19 PM, Alex Kac wrote: >> >>> I'm fairly certain my prob

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Alex Kac
Yes, we already take care of the 24 hour situation. This is explicitly for people who are showing their times using AM/PM. Not that its an iron-clad thing either, but we've been doing calendaring for over 10 years now so I'm aware of the date/time notation by country. But again this is explicitl

Re: AM/PM letter UNICODE issues

2010-10-18 Thread Quincey Morris
On Oct 18, 2010, at 10:19, Alex Kac wrote: > 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]

Re: AM/PM letter UNICODE issues

2010-10-18 Thread A.M.
On Oct 18, 2010, at 2:41 PM, glenn andreas wrote: > > On Oct 18, 2010, at 12:19 PM, Alex Kac wrote: > >> 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 Langu

Re: AM/PM letter UNICODE issues

2010-10-18 Thread glenn andreas
On Oct 18, 2010, at 12:19 PM, Alex Kac wrote: > 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". > > NSDateF

AM/PM letter UNICODE issues

2010-10-18 Thread Alex Kac
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];