Permalink
Browse files

now, parrot is strict with string encoding

  • Loading branch information...
fperrad committed Jan 23, 2011
1 parent c45c4d3 commit b77264ba93413192441f7c71e08ca0eafe55e6de
Showing with 4 additions and 1 deletion.
  1. +4 −1 lua/lib/luaaux.pir
View
@@ -597,7 +597,9 @@ messages and in debug information.
unless $S0 == "\033Lua" goto L2
.tailcall undump(data, chunkname)
L2:
- .tailcall parser(data, chunkname)
+ $I0 = find_encoding 'ascii'
+ $S0 = trans_encoding data, $I0
+ .tailcall parser($S0, chunkname)
.end
.sub 'parser' :anon
@@ -714,6 +716,7 @@ This function only loads the chunk; it does not run it.
f = new 'FileHandle'
push_eh _handler
f.'open'(filename, 'r')
+ f.'encoding'('binary')
pop_eh
L2:
$S0 = f.'readall'()

0 comments on commit b77264b

Please sign in to comment.