Skip to content
Browse files

Fix for PDF jump (at least on Windows)

Strings in p3k are unicode by design.
1 parent 710eead commit 6191911f9f2f2a589a4ff1eda2d7334f9a184b28 @z-m-k committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 DDEExecute.py
View
5 DDEExecute.py
@@ -34,8 +34,7 @@ def py_mycallback(uType, uFmt, hconv, hsz1, hsz2, hdata, dwData1, dwData2):
# server and topic names, as LPTSTR = wchar *
service = c_wchar_p(service)
topic = c_wchar_p(topic)
- encCommand = command.encode("utf-8")
- pData = c_char_p(encCommand)
+ pData = c_char_p(command)
cbData = len(command)+1 # Important! Zero-terminated!
# initialize
@@ -67,4 +66,4 @@ def py_mycallback(uType, uFmt, hconv, hsz1, hsz2, hdata, dwData1, dwData2):
DdeFreeStringHandle(idInst, hszService)
DdeDisconnect(hConv)
DdeUninitialize(idInst)
-
+

0 comments on commit 6191911

Please sign in to comment.
Something went wrong with that request. Please try again.