Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unicode problem



Hi everyone,

I realize my last message may not have been clear, so I'm enclosing code to show what specifically does not work. I have an entry field in which the user types a letter, and I check the value as follows:

- (id)sender
{
NSString *enteredValue;
enteredValue = [entryField stringValue];

if ([enteredValue isEqualToString: @"a"])
{
[resultField setStringValue:@"A"];
NSLog(@"It was an a.");
}
else if ([enteredValue isEqualToString: @"b"])
{
[resultField setStringValue:@"B"];
NSLog(@"It was a b.");
}
else if ([enteredValue isEqualToString: @"p"])
{
[resultField setStringValue:@"
"];
NSLog(@"It was an p.");
}
else if ([enteredValue isEqualToString: @""])
{
[resultField setStringValue:@"b"];
NSLog(@"It was an .");
}
else
{
[resultField setStringValue:@"?"];
NSLog(@"Entered letter was %@", enteredValue);
}
}

Letters are OK (a, b, etc.). However, the Bopomofo characters cannot be printed back to the resultField, and also do not show up properly in NSLog in the console. I'd appreciate your help. Thanks.

Daniel
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.