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 pure Haskell implementation for Windows support #3

Merged
merged 3 commits into from
Oct 16, 2018

Conversation

agentm
Copy link
Contributor

@agentm agentm commented Apr 15, 2018

Because Windows offers no equivalent to wcwidth, this patch includes a pure Haskell implementation based on this python implementation. The python implementation actually generates the tables from testing based on the Unicode website, so it should be more reliable and up-to-date when compared to the native implementation. If that's the case, it may be worthwhile to allow the user to choose the Haskell implementation, though this pull request does not include that option.

Obviously, the Windows implementation may behave differently from the libc implementation, but I didn't see that as a problem worth solving. Let me know if you disagree.

Tangentially, I also included a working stack.yaml which I used to compile on Windows.

I am currently using this implementation in a console application consuming and generating Chinese multibyte characters, so it appears to work well.

resolves #2

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.

add Windows support
2 participants