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

switch to Windows code page 65001 in exe:unison and exe:tests #2917

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

aryairani
Copy link
Contributor

@aryairani aryairani commented Feb 17, 2022

I think it's only needed in these two spots, as the other executables just shell out to stack exec unison.

I'm not actually clear on how this interacts with (or could be replaced by hSetEncoding, which we do have sprinkled around already, but not sufficiently to let Windows builds work. If there's a cleaner solution, I'd like to use it. i.e. Am I papering over a more correct multi-platform fix by using the Windows-only System.IO.Codepage?

See https://hackage.haskell.org/package/code-page-0.2.1/docs/src/System.IO.CodePage.html#withCodePage

@aryairani aryairani changed the base branch from topic/windows-build to trunk February 17, 2022 22:53
I think it's only needed in these two spots, as the other
executables just shell out to `stack exec unison`.

I'm not actually clear on how this interacts with (or could be replaced by `hSetEncoding`, which we do have sprinkled around already, but not sufficiently to let Windows builds work.

If there's a cleaner solution, I'd like to use it. i.e. am I papering over a more correct multi-platform fix by using the Windows-only System.IO.Codepage?
@aryairani aryairani marked this pull request as ready for review February 17, 2022 23:24
@aryairani aryairani mentioned this pull request Feb 17, 2022
21 tasks
@pchiusano
Copy link
Member

Should this be behind a cpp flag, only taking effect if the OS is windows? I was under the impression that codepages for console output was just a janky windows only thing and consoles on other platforms can just print arbitrary unicode. Do you know what effect it has when it's set on other platforms?

@aryairani
Copy link
Contributor Author

@pchiusano The CPP flag is inside the library calls.

@aryairani
Copy link
Contributor Author

System.IO.CodePage: a cross-platform module that exports functions which adjust code pages on Windows, and do nothing on other operating systems.

@pchiusano pchiusano merged commit 1a92f2a into trunk Feb 18, 2022
@pchiusano pchiusano deleted the topic/cp65001 branch February 18, 2022 19:03
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.

2 participants