summaryrefslogtreecommitdiff
path: root/symbian/PerlBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'symbian/PerlBase.cpp')
-rw-r--r--symbian/PerlBase.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/symbian/PerlBase.cpp b/symbian/PerlBase.cpp
index 4162e57759..9312abeb55 100644
--- a/symbian/PerlBase.cpp
+++ b/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++;
}