(svn r11389) -Fix [FS#1386]: Replace calls to deprecated API with newer ones and handle broken iconv declaration in OSX 10.5.

This commit is contained in:
egladil
2007-11-07 21:35:33 +00:00
parent 0154541982
commit cd5597dddf
5 changed files with 51 additions and 43 deletions

View File

@@ -168,6 +168,6 @@ const char *GetCurrentLocale(const char *)
NSArray* languages = [defs objectForKey:@"AppleLanguages"];
NSString* preferredLang = [languages objectAtIndex:0];
/* preferredLang is either 2 or 5 characters long ("xx" or "xx_YY"). */
strncpy(retbuf, [preferredLang cString], 31);
[ preferredLang getCString:retbuf maxLength:32 encoding:NSASCIIStringEncoding ];
return retbuf;
}