Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
8f40188b
Commit
8f40188b
authored
Jul 08, 2014
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the proper encoding for cut text with screen sharing
parent
a420c7dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
_rfb.pyx
blink/screensharing/_rfb.pyx
+5
-6
No files found.
blink/screensharing/_rfb.pyx
View file @
8f40188b
...
@@ -26,7 +26,6 @@ cdef extern from "stdarg.h":
...
@@ -26,7 +26,6 @@ cdef extern from "stdarg.h":
cdef extern from "Python.h":
cdef extern from "Python.h":
object PyString_FromStringAndSize(const char *u, Py_ssize_t size)
object PyString_FromStringAndSize(const char *u, Py_ssize_t size)
object PyUnicode_FromStringAndSize(const char *u, Py_ssize_t size)
int PyOS_vsnprintf(char *buf, size_t size, const char *format, va_list va)
int PyOS_vsnprintf(char *buf, size_t size, const char *format, va_list va)
...
@@ -338,15 +337,15 @@ cdef class RFBClient:
...
@@ -338,15 +337,15 @@ cdef class RFBClient:
def send_client_cut_text(self, unicode text):
def send_client_cut_text(self, unicode text):
cdef int result, strlen
cdef int result, strlen
cdef bytes text_
utf8
cdef bytes text_
latin1
cdef char *string
cdef char *string
if not self.connected:
if not self.connected:
return
return
text_
utf8 = text.encode('utf8
')
text_
latin1 = text.encode('latin1
')
string = text_
utf8
string = text_
latin1
strlen = len(text_
utf8
)
strlen = len(text_
latin1
)
with nogil:
with nogil:
result = SendClientCutText(self.client, string, strlen)
result = SendClientCutText(self.client, string, strlen)
...
@@ -403,7 +402,7 @@ cdef class RFBClient:
...
@@ -403,7 +402,7 @@ cdef class RFBClient:
return credential
return credential
cdef void _text_cut_callback(self, const char *text, int length):
cdef void _text_cut_callback(self, const char *text, int length):
cut_text = Py
Unicode_FromStringAndSize(text, length
)
cut_text = Py
String_FromStringAndSize(text, length).decode('latin1'
)
if cut_text:
if cut_text:
self.parent.textCut.emit(cut_text)
self.parent.textCut.emit(cut_text)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment