convert to 4-byte UTF-8 and 32-bit Rune
http://codereview.appspot.com/116075
This commit is contained in:
parent
4dbf255619
commit
0cadb4301d
14 changed files with 86 additions and 44 deletions
|
|
@ -152,9 +152,9 @@ wcstombs(char *s, const wchar_t *pwcs, size_t n)
|
|||
if(p+d <= pe+3) {
|
||||
*p++ = buf[0];
|
||||
if(d > 1) {
|
||||
*p++ = buf[2];
|
||||
*p++ = buf[1];
|
||||
if(d > 2)
|
||||
*p++ = buf[3];
|
||||
*p++ = buf[2];
|
||||
}
|
||||
}
|
||||
if(c == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue