[Scummvm-devel] setlocale() doesn't work at Symbian

Filippos Karapetis bluegr at gmail.com
Tue Feb 17 12:52:33 CET 2015


You don't use a correct value for the locale

You would want something like:
setlocale(LC_ALL,"en_GB.ISO-8859-1");

Having said that, check backends/platform/sdl/sdl.cpp, where it does this:
const Common::String locale = setlocale(LC_ALL, "");

// Restore default C locale to prevent issues with
// portability of sscanf(), atof(), etc.
// See bug #3615148
setlocale(LC_ALL, "C");

Be careful when changing the locale, you need to reset it afterwards (as
the comment mentions).

This stackoverflow question may be helpful:
http://stackoverflow.com/questions/3191664/list-of-all-locales-and-their-short-codes

On Tue, Feb 17, 2015 at 1:08 PM, Fiodar Strizhniou <fedor_qd at mail.ru> wrote:

> I write simple application and run on phone:
>   printf("Locale is: %s\n", setlocale(LC_ALL, "en_GB"));
> Locale is NULL
> Which parts (decimal separators, etc) should be set? Which values from
> setlocale() used?
> Always yours, Strizhniou Fedor.
> С уважением, Стрижнёв Фёдор.
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>



-- 
"Experience is the name every one gives to their mistakes" - Oscar Wilde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20150217/0954a6aa/attachment.html>


More information about the Scummvm-devel mailing list