aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/wc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/toys/posix/wc.c b/toys/posix/wc.c
index a8c3e452..96ff9788 100644
--- a/toys/posix/wc.c
+++ b/toys/posix/wc.c
@@ -80,6 +80,7 @@ static void do_wc(int fd, char *name)
// next wide size, don't count invalid, fetch more data if necessary
clen = mbrtowc(&wchar, toybuf+pos, len-pos, 0);
+ clen = utf8towc(&wchar, toybuf+pos, len-pos);
if (clen == -1) continue;
if (clen == -2 && !done) break;