rc: handle 4-byte utf-8

R=rsc
http://codereview.appspot.com/3833043
This commit is contained in:
Russ Cox
2011-01-02 13:44:15 -05:00
parent 72f66c2d3c
commit 0786c9647c
3 changed files with 20 additions and 0 deletions

View File

@@ -173,6 +173,11 @@ addutf(char *p, int c)
p = addtok(p, advance());
return addtok(p, advance());
}
if(fourbyte(c)){ /* 4-byte escape */
p = addtok(p, advance());
p = addtok(p, advance());
return addtok(p, advance());
}
return p;
}
int lastdol; /* was the last token read '$' or '$#' or '"'? */