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

Probably doesn't work as expected on some Windows machines #2

Closed
notatestuser opened this issue Dec 4, 2016 · 2 comments · Fixed by #13
Closed

Probably doesn't work as expected on some Windows machines #2

notatestuser opened this issue Dec 4, 2016 · 2 comments · Fixed by #13

Comments

@notatestuser
Copy link

node-copy-paste uses the same method of execing clip on Windows but I had some trouble with Unicode characters on systems running ASCII-only code pages (for instance, those configured with en-US locales).

I've addressed this in my fork of node-copy-paste by setting the code page to 65001 before running clip.exe.

execa might already be handling this but I'm not sure.

@sindresorhus
Copy link
Owner

Tests are passing on Windows. Happy to look more into this if you submit a failing test :)

clipboardy/test.js

Lines 20 to 33 in 0a097ac

test('works with ascii', async t => {
const f = '123456789abcdefghijklmnopqrstuvwxyz+-=&_[]<^=>=/{:})-{(`)}';
t.is(await writeRead(f), f);
});
test('works with unicode', async t => {
const f = 'ĀāĂ㥹ĆćĈĉĊċČčĎ ፰፱፲፳፴፵፶፷፸፹፺፻፼ æøå ±';
t.is(await writeRead(f), f);
});
test('works with emojis', async t => {
const f = '🦄❤️🤘🐑💩';
t.is(await writeRead(f), f);
});

https://ci.appveyor.com/project/sindresorhus/clipboardy/branch/master

@notatestuser
Copy link
Author

There's no need: the existing tests fail themselves on my Windows 10 (build 10240) machine with a default code page of 437. I've been trying to reproduce this in Appveyor without much luck.

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 a pull request may close this issue.

2 participants