Re: [Vala] Error with OptionEntry and unicode string.



Thanks.
It works with Intl.setlocale();

Walter


2016-02-10 12:21 GMT+01:00 Al Thomas <astavale yahoo co uk>:





----- Original Message -----
From: Walter Valenti <valenti walter gmail com>
Sent: Wednesday, 10 February 2016, 11:14
Subject: [Vala] Error with OptionEntry and unicode string.

If i call "-n" with a ascii string, it works, but with a unicode
string
I've got an error:

./par -n รจรจ

** (par:25597): CRITICAL **: file
/home/walter/pyLabrador/TRUNK/Vala/par.vala.c: line 66: uncaught error:
Invalid byte sequence in conversion input (g_convert_error, 1)

My LANG variable is: it_IT.UTF-8


Try putting:

Intl.setlocale();

at the beginning of your main function.

Or for older versions of Vala:


Intl.setlocale( LocaleCategory.ALL, "" )

This sets the locale to that on the machine, not the C language default,
which is US-ASCII.

Al



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]