[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua with chinese character set
- From: "mos" <mmosquito@...>
- Date: Thu, 20 Apr 2006 17:28:25 +0800
Hi!
? is a character character
print('?')
--out
unfinished string near ''?)'
print(string.byte([[?]],1,2))
-- out
179 92
92 = '\\' so lua report error
I add some code at the llex.c line 278
while (ls->current != del) {
+ if (ls->current >= 128) { //a chinese character
+ save_and_next(ls);
+ save_and_next(ls);
+ continue;}
switch (ls->current) {
and it seems ok now . am I right ? or any better suggestion ?
mos