-
All replies
-
Helpful answers
-
-
Dec 15, 2011 6:47 PM in response to etresoftby luckymascot,I need it in a C library where I need to convert char* to uniode string. For this conversion i am using mbstowcs(), but it requires locale to be set.
What locale i need to set on iPad for correct unicode conversion?
-
Dec 16, 2011 2:45 PM in response to luckymascotby etresoft,I know the reason for the wchar. My question was more rhetorical to make you think.
You have Cocoa on the iPad. All of your user-generated string input is already in NSStrings that fully support Unicode. There are NSString methods to convert to UTF8 C strings if you need them. If you are getting data from some internet source, it will likely already be in UTF8.
In short, there is no reason to use wchar unless you just really want to do 3 times the work and you enjoy punishing yourself.
-
Oct 4, 2016 11:29 AM in response to luckymascotby heckmeck,Dear luckymascot,
it's been a while - have you ever figured out how to solve this ?
I am trying to utilise strftime() to achieve a portable (Android/iOS) implementation of certain calendar functions.
For localisation, I use setlocale(LC_TIME, "fr_FR") (e.g.) - which works beautifully with the iOS simulator, but fails on any iOS device. - On devices, setlocale() always returns NULL ...