Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard functions don't support Unicode on Windows #9263

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

Comments

@jcjf
Copy link
Contributor

@jcjf 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.

@jreback

This comment has been minimized.

Copy link
Contributor

@jreback jreback commented Jan 16, 2015

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

pls pd.show_versions()

@jcjf

This comment has been minimized.

Copy link
Contributor Author

@jcjf 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.

@jreback

This comment has been minimized.

Copy link
Contributor

@jreback 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.

@jcjf

This comment has been minimized.

Copy link
Contributor Author

@jcjf jcjf commented Mar 17, 2015

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

@jreback

This comment has been minimized.

Copy link
Contributor

@jreback 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 jreback added this to the 0.16.1 milestone Mar 18, 2015
@jcjf jcjf mentioned this issue Mar 20, 2015
3 of 3 tasks complete
@jreback jreback modified the milestones: 0.16.1, 0.17.0 Apr 28, 2015
@jreback jreback modified the milestones: 0.17.0, Next Major Release Aug 31, 2015
@jreback jreback added the Prio-medium label Aug 31, 2015
@jreback jreback modified the milestones: 0.18.0, Next Major Release Nov 30, 2015
@jreback

This comment has been minimized.

Copy link
Contributor

@jreback jreback commented Dec 5, 2015

closed by #11712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.