Sync utf8 clipboard support

This commit is contained in:
Lauri Kasanen
2021-04-12 12:38:24 +03:00
parent 04461b9d4c
commit a1cf454f06
34 changed files with 1794 additions and 181 deletions

View File

@@ -1,5 +1,5 @@
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
* Copyright 2011-2015 Pierre Ossman for Cendio AB
* Copyright 2011-2019 Pierre Ossman for Cendio AB
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -226,3 +226,35 @@ int vncIsTCPPortUsed(int port)
}
return 0;
}
char* vncConvertLF(const char* src, size_t bytes)
{
try {
return convertLF(src, bytes);
} catch (...) {
return NULL;
}
}
char* vncLatin1ToUTF8(const char* src, size_t bytes)
{
try {
return latin1ToUTF8(src, bytes);
} catch (...) {
return NULL;
}
}
char* vncUTF8ToLatin1(const char* src, size_t bytes)
{
try {
return utf8ToLatin1(src, bytes);
} catch (...) {
return NULL;
}
}
void vncStrFree(char* str)
{
strFree(str);
}