-
Notifications
You must be signed in to change notification settings - Fork 2
chcp 65001 before stylish-haskell on windows #11
Comments
Since command is run as a child process, and not in the shell, chcp doesn't work as one would expect and breaks more things then it fixes. A better solution would be to have a patched version of stylish-haskell that sets stdio encoding to utf-8. |
@lierdakil hm... I need more information of this, when I run stylish-haskell from console with chcp 65001 it actually works. oh feels like I even created this issue in wrong project |
Consider this: chcp is guaranteed to work in terminal, and it changes encoding for current terminal as a whole. But Atom is a GUI application, it doesn't have an associated terminal. What will chcp do? |
@lierdakil well but you can run stylish-haskell from shell, adding I mean run from atom using some api which allows using OS shell... or even more uglier with |
I believe back in the day I tried it with ghc-mod with rather dissapointing results. If you're feeling adventurous, you might test it like so (in developer console, assuming atom.workspace.getActiveTextEditor().setText(require('child_process').execSync('chcp 65001 ; stylish-haskell', {input: atom.workspace.getActiveTextEditor().getText(), stdio: 'pipe', encoding: 'utf-8'})) Using |
well it works but as start of file it adds |
Closing, since this is fixed by upstream. |
for unicode support
The text was updated successfully, but these errors were encountered: