diff options
Diffstat (limited to 'gnu/usr.bin/perl/symbian/PerlBase.cpp')
-rw-r--r-- | gnu/usr.bin/perl/symbian/PerlBase.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/usr.bin/perl/symbian/PerlBase.cpp b/gnu/usr.bin/perl/symbian/PerlBase.cpp index 4162e577594..9312abeb55b 100644 --- a/gnu/usr.bin/perl/symbian/PerlBase.cpp +++ b/gnu/usr.bin/perl/symbian/PerlBase.cpp @@ -364,7 +364,9 @@ int CPerlBase::ConsoleRead(const int fd, char* buf, int n) #else dTHX; for (i = 0; i < nUtf8; i+= UTF8SKIP(pUtf8 + i)) { - unsigned long u = utf8_to_uvchr((U8*)(pUtf8 + i), 0); + unsigned long u = utf8_to_uvchr_buf((U8*)(pUtf8 + i), + (U8*)(pUtf8 + nUtf8), + 0); if (u > 0xFF) { iConsole->Printf(_L("(keycode > 0xFF)\n")); buf[i] = 0; @@ -401,7 +403,7 @@ int CPerlBase::ConsoleWrite(const int fd, const char* buf, int n) dTHX; if (is_utf8_string((U8*)buf, n)) { for (int i = 0; i < n; i += UTF8SKIP(buf + i)) { - TChar u = utf8_to_uvchr((U8*)(buf + i), 0); + TChar u = valid_utf8_to_uvchr((U8*)(buf + i), 0); iConsole->Printf(_L("%c"), u); wrote++; } |