Clipboard functions don't support Unicode on Windows #9263

Closed
jcjf opened this Issue Jan 15, 2015 · 6 comments

Comments

Projects
None yet
2 participants
Contributor

jcjf commented Jan 15, 2015

Recent versions of pyperclip (pandas.util.clipboard) use CF_UNICODETEXT getting data from and putting data to the WIndows Clipboard.

Contributor

jreback commented Jan 16, 2015

what needs to change? what is the probemetic statement? want to do a pull-request?

pls pd.show_versions()

Contributor

jcjf commented Jan 16, 2015

Currently, git master for pandas is based on pyperclip 1.3, the latest version is 1.5.7. The Unicode features for Windows were added very recently. I'd be tempted to replace the code pandas.util.clipboard with https://github.com/asweigart/pyperclip/blob/master/pyperclip/__init__.py. I don't know how to compile and test pandas on Windows (I've always used Christoph Gohlke's binaries).

My use case at the office was that I was trying to load clipboard data from Excel that was in Spanish. The current code in pandas.util.clipboard couldn't handle this. I am at home now but I think a UnicodeDecodeError was thrown - it should be easy to reproduce this issue with non-ASCII clipboard data.

Contributor

jreback commented Jan 16, 2015

ahh, ok. Yes we can just update in master to the new version. Though would like some tests for validation.

Contributor

jcjf commented Mar 17, 2015

Since pyperclip is now a PyPI package, is it better to make it an optional dependency?

Contributor

jreback commented Mar 18, 2015

we could update the pyperclip package. Don't want to add another specific dep (e.g. that you might have to download).

jreback added this to the 0.16.1 milestone Mar 18, 2015

jcjf referenced this issue Mar 20, 2015

Closed

Update vendored pyperclip to 1.5.8 #9693

3 of 3 tasks complete

@jreback jreback modified the milestone: 0.16.1, 0.17.0 Apr 28, 2015

@jreback jreback modified the milestone: 0.17.0, Next Major Release Aug 31, 2015

jreback added the Prio-medium label Aug 31, 2015

@jreback jreback modified the milestone: 0.18.0, Next Major Release Nov 30, 2015

Contributor

jreback commented Dec 5, 2015

closed by #11712

jreback closed this Dec 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment