Mailing Lists: Apple Mailing Lists

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

Displaying Swedish Characters?



Hi,

I maintain a postgresql cocoa based browser. I recently received
an email:

>Hi,
>Great app by the way.

>I have a Latin1 database, fields containing swedish characters , like the name "Sölve" appears as empty strings >in the result list.

>I don't know any ObjectiveC so I cannot fix this myself in the code, sorry.

My table filling routine looks like:
***************
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
char *value;
int fieldNum = [[tableColumn headerCell] tag];
BOOL isNull = PQgetisnull(lastResult, row, fieldNum);
if (isNull) {
if( [displayNULL state])
{ return @"<NULL>" ; }
else return @"" ;
}


    value = PQgetvalue(lastResult, row, fieldNum);


if (([suppressLongFields state ] == NSOnState ) && (strlen(value) > LONG_FIELD))
return [NSString stringWithFormat:@"<LoNg FiElD:%d>",strlen(value)] ;
return [NSString stringWithUTF8String:value];
}


*************
Am I missing something obvious?

Jerry
_______________________________________________
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.