[Vala] Error with OptionEntry and unicode string.
- From: Walter Valenti <valenti walter gmail com>
- To: vala-list gnome org
- Subject: [Vala] Error with OptionEntry and unicode string.
- Date: Wed, 10 Feb 2016 12:14:59 +0100
This is the example:
//Begin
class Main : Object{
private static string name = "";
private const OptionEntry[] options = {{"name", 'n', 0,
OptionArg.STRING, ref name, "Cerca per nome", "nome"}, {null}};
public static int main(string[] args){
var opt_context = new OptionContext ("Prova");
opt_context.set_help_enabled (true);
opt_context.add_main_entries (options, null);
opt_context.parse (ref args);
print("name: " + name + "\n");
return 0;
}
}
//End
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
Thanks.
Walter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]