Hi
I want to use CFLocale in my application. But I've encountered a strange problem.
This code doesn't work
But this does
Can't understand why
I want to use CFLocale in my application. But I've encountered a strange problem.
This code doesn't work
Code:
CFLocaleRef locale = CFLocaleGetSystem();
CFStringRef cfstr = CFStringCreateCopy(NULL, (CFStringRef)CFLocaleGetValue(locale, kCFLocaleGroupingSeparator));
qDebug()<<CFStringGetCStringPtr(cfstr, kCFStringEncodingMacRoman);
Code:
CFLocaleRef locale = CFLocaleGetSystem();
CFBooleanRef b = (CFBooleanRef) CFLocaleGetValue(locale, kCFLocaleUsesMetricSystem);
qDebug()<< CFBooleanGetValue(b);