diff options
Diffstat (limited to 'unix/xserver/hw/vnc/RFBGlue.cc')
-rw-r--r-- | unix/xserver/hw/vnc/RFBGlue.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc index 2fbc27ee..25431b65 100644 --- a/unix/xserver/hw/vnc/RFBGlue.cc +++ b/unix/xserver/hw/vnc/RFBGlue.cc @@ -248,3 +248,12 @@ char* vncUTF8ToLatin1(const char* src, size_t bytes) return NULL; } } + +int vncIsValidUTF8(const char* str, size_t bytes) +{ + try { + return isValidUTF8(str, bytes); + } catch (...) { + return 0; + } +} |