Bug in utfwriter!!!

3 views
Skip to first unread message

Kyle Alexander Buan

unread,
Oct 13, 2013, 6:24:59 AM10/13/13
to alche...@googlegroups.com
Code:
use "textio"
use "string"
def main(a: [String]) {
var o=utfwriter(fopen_w("/home/d.txt"))
o.print('\u0162'.tostr())
o.print('\u016C'.tostr())
o.print('\u0176'.tostr())
o.close() }

The output text SHOULD be:
ŢŬŶ

BUT the output is:
ŢŢŶ

Please fix this bug :)

Sergey Basalaev

unread,
Oct 14, 2013, 6:24:25 AM10/14/13
to Alchemy OS
2013/10/13 Kyle Alexander Buan <tar.s...@gmail.com>
Hi! Does this happen only with utfwriter?
Is everything ok if you call just:

println("\u0162\u016C\u0176")

Sergey Basalaev

unread,
Oct 14, 2013, 8:03:01 AM10/14/13
to Alchemy OS
2013/10/14 Sergey Basalaev <sbas...@gmail.com>

 
Hi! Does this happen only with utfwriter?
Is everything ok if you call just:

println("\u0162\u016C\u0176")


Ok, utfwriter works normally. What you've found is a serious bug
in compiler. Shame on me, it parses hexadecimal numbers incorrectly!

Kyle Alexander Buan

unread,
Oct 14, 2013, 8:15:40 AM10/14/13
to alche...@googlegroups.com
No, it's NOT a shame, Sergey. You did an absolutely great job with
Alchemy OS. It just happens that it has some bugs :)
I'll be waiting for the fix :)
> --
> You received this message because you are subscribed to the Google Groups
> "Alchemy OS discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to alchemy-os+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

Sergey Basalaev

unread,
Oct 14, 2013, 8:22:07 AM10/14/13
to Alchemy OS
2013/10/14 Kyle Alexander Buan <tar.s...@gmail.com>
No, it's NOT a shame, Sergey. You did an absolutely great job with
Alchemy OS. It just happens that it has some bugs :)
I'll be waiting for the fix :)

As a temporary solution you can use decimal character codes, either printing
them with Writer.write(code) or converting to characters as (number).cast(Char)

Kyle Alexander Buan

unread,
Oct 14, 2013, 9:13:31 AM10/14/13
to alche...@googlegroups.com
I understand that Decimal is an equal substitute, but still, typing
65536 as 0xFFFF is still cool :) No hurry, but I hope it gets fixed :)


On 10/14/13, Sergey Basalaev <sbas...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages