Re: [Vala] printf bug with nonlatin pattern
- From: Jan Van Buggenhout <chipzz safehex be>
- To: Jared Moore <jaredm gmx com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] printf bug with nonlatin pattern
- Date: Tue, 12 Aug 2008 23:41:05 +0200
I don't think this is a bug. stdout.printf maps to the libc function
printf, which only supports ASCII (I think), so the resulting outcome is
correct, and this is not a bug. Unless I am mistaken of course.
kr,
Jan
On 2008-08-11 12:47:16 (+1000), Jared Moore <jaredm gmx com> wrote:
Hi,
Please file a bug for this in bugzilla [1], since it will get
lost/forgotten in the mailing list.
[1] http://bugzilla.gnome.org/enter_bug.cgi?product=vala
Cheers,
Jared
2008/8/11 Alexey Lubimov <avl l14 ru>:
printf don't accept nonlatin string as pattern:
for example:
stdout.printf("??????? %s", "??????");
or
"??????? %s".printf("??????");
but sucessfully accept predefined string!
for example:
string pattern = "??????? %s";
pattern.printf("??????");
testcase attached;
valac -o string_bug string_bug.vala
string_bug.vala:11.5-11.41: error: Too many arguments for specified format
stdout.printf("??????? %s", "??????");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
But with workaround:
valac -o string_bug string_bug.vala
./string_bug
??????? ??????
//valac -o string_bug string_bug.vala
public class StringBug : GLib.Object
{
public static int main (string[] args) {
// this is case to reproduce bug in valac
// stdout.printf("??????? %s", "??????");
// this is workaround
string pattern = "??????? %s";
stdout.printf(pattern,"??????");
return 0;
}
}
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
Chipzz AKA
Jan Van Buggenhout
--
------------------------------------------------------------------------
UNIX isn't dead - It just smells funny
Chipzz SafeHex be
------------------------------------------------------------------------
"Baldric, you wouldn't recognize a subtle plan if it painted itself pur-
ple and danced naked on a harpsicord singing 'subtle plans are here a-
gain'."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]