Author: leo
Date: Wed Mar 22 07:23:08 2006
New Revision: 11982
Modified:
trunk/src/io/io_utf8.c
trunk/t/pmc/io.t
Log:
strings - utf8 input filter
* fix test, error handling
Modified: trunk/src/io/io_utf8.c
==============================================================================
--- trunk/src/io/io_utf8.c (original)
+++ trunk/src/io/io_utf8.c Wed Mar 22 07:23:08 2006
@@ -77,8 +77,8 @@
PIO_read_down(interpreter, layer->down, io, &s2);
s->strlen = iter.charpos;
s = string_append(interpreter, s, s2, 0);
- s->strlen = iter.charpos + 1;
- return len + len2 + 1;
+ len += len2 + 1;
+ /* check last char */
}
}
ok:
Modified: trunk/t/pmc/io.t
==============================================================================
--- trunk/t/pmc/io.t (original)
+++ trunk/t/pmc/io.t Wed Mar 22 07:23:08 2006
@@ -683,8 +683,10 @@
.local pmc pio
.local int len
.include "stat.pasm"
- len = stat "1", .STAT_FILESIZE
- pio = open "1", "<"
+ .local string f
+ f = 'temp.file'
+ len = stat f, .STAT_FILESIZE
+ pio = open f, "<"
push pio, "utf8"
$S0 = read pio, 2
len -= 2