Skip to content

Clipboard functions don't support Unicode on Windows #9263

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

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

Clipboard functions don't support Unicode on Windows #9263

jcjf opened this issue Jan 15, 2015 · 6 comments
Labels
Output-Formatting __repr__ of pandas objects, to_string Unicode Unicode strings Windows Windows OS
Milestone

Comments

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

@jreback
Copy link
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()

@jreback jreback added Output-Formatting __repr__ of pandas objects, to_string Unicode Unicode strings Windows Windows OS labels Jan 16, 2015
@jcjf
Copy link
Contributor Author

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
Copy link
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.

@jcjf
Copy link
Contributor Author

jcjf commented Mar 17, 2015

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

@jreback
Copy link
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 jreback added this to the 0.16.1 milestone Mar 18, 2015
@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 modified the milestones: 0.18.0, Next Major Release Nov 30, 2015
@jreback
Copy link
Contributor

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
Labels
Output-Formatting __repr__ of pandas objects, to_string Unicode Unicode strings Windows Windows OS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants