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

Add clipboard(x), clipboard() for windows #4238

Merged
merged 1 commit into from
Sep 9, 2013
Merged

Add clipboard(x), clipboard() for windows #4238

merged 1 commit into from
Sep 9, 2013

Conversation

quinnj
Copy link
Member

@quinnj quinnj commented Sep 9, 2013

I'm not an expert on the Windows API by any means, but this is the function that I've had in my .juliarc for quite a while and have used fairly frequently. Please let me know of appropriate changes that need to be made.

I'm not an expert on the Windows API by any means, but this is the function that I've had in my .juliarc for quite a while and have used fairly frequently. Please let me know of appropriate changes that need to be made.
@quinnj
Copy link
Member Author

quinnj commented Sep 9, 2013

Probably best if @vtjnash and/or @loladiro review this.

@StefanKarpinski
Copy link
Member

Since no one can be depending on this yet, it's safe enough to merge and then adjust as necessary.

StefanKarpinski added a commit that referenced this pull request Sep 9, 2013
Add clipboard(x), clipboard() for windows
@StefanKarpinski StefanKarpinski merged commit 09f0a9a into JuliaLang:master Sep 9, 2013
@quinnj quinnj deleted the patch-1 branch September 9, 2013 21:07
@vtjnash
Copy link
Member

vtjnash commented Sep 9, 2013

Seems fine. Note that it needs to be fixed to use bytestring/sizeof instead of string/length. Also, does windows accept UTF8 as Unicode? I thought it did everything with either ASCII or UTF16.

@StefanKarpinski
Copy link
Member

Unicode not an encoding, so technically calling this CF_UNICODETEXT as they seem to is meaningless. Classic Microsoft brain damage. Without further documentation, it's hard to say whether this means UTF-8 or UTF-16, but you could probably find out pretty easily by experimenting with sending data to Notepad and back.

@quinnj
Copy link
Member Author

quinnj commented Sep 9, 2013

I noted in another PR that the CF_UNICODETEXT is UTF-16. Recommendations I've seen say to use CF_TEXT unless you're explicitly using UTF-16 strings.

@StefanKarpinski
Copy link
Member

Ok, fixed it. Shame that we won't support Unicode copy-and-paste on Windows though.

@vtjnash
Copy link
Member

vtjnash commented Sep 10, 2013

our unicode support is pretty bad on windows anyways: #1919

@StefanKarpinski
Copy link
Member

Arguably, Windows' support for sane string processing is what's lacking, but point taken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants