mhammond / pywin32

Python for Windows (pywin32) Extensions
4.92k stars 786 forks source link

PutHtml() doesn't work with Unicode chars #2061

Closed VladimirAlexiev closed 1 year ago

VladimirAlexiev commented 1 year ago

(This is a repost of https://github.com/jkitchin/ox-clip/issues/2)

Expected behavior and actual behavior:

Steps to reproduce the problem:

let's try "quotes" and long—dash.

- run `python html-clip-w32.py < test.html`
- Nothing is put on the clipboard
- Remove the first paragraph and repeat the test
- This is put on the clipboard in HTML format: `let's try "quotes" and long—dash. `

Versions:
Windows10 64bit with Cygwin

uname

CYGWIN_NT-10.0

which python

/c/Python310/python

python -V

Python 3.10.4

pip show pywin32

Name: pywin32 Version: 306

mhammond commented 1 year ago

https://github.com/mhammond/pywin32#support

VladimirAlexiev commented 1 year ago

In another case, this source

|  4 | Musée Royal d’Afrique centrale (MRAC)                       | Belgium |

comes out like this:

4 | Musée Royal d’Afrique centrale (MRAC) | Belgium -- | -- | --
VladimirAlexiev commented 1 year ago

Posted on mailing list, awaiting a response: https://mail.python.org/pipermail/python-win32/2023-May/014799.html