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

UTF16 and Conhost support for Windows #175

Merged
merged 28 commits into from Nov 11, 2023
Merged

Conversation

oshaboy
Copy link
Contributor

@oshaboy oshaboy commented Nov 4, 2023

this adds 2 new options
--utf16 output using WriteConsoleW
--format conhost use Legacy Windows Console API (implies --utf16)

@oshaboy
Copy link
Contributor Author

oshaboy commented Nov 4, 2023

Oh right there's also --encoding which converts utf-8 to a legacy codepage using iconv

Copy link
Owner

@hpjansson hpjansson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good overall. My main requests are that we leave the UTF-16 switch/WriteConsoleW() code out for now and focus on the direct Conhost output, plus a raft of small stylistic changes.

Thanks a lot for doing this!

tools/chafa/chafa.c Show resolved Hide resolved
tools/chafa/chafa.c Show resolved Hide resolved
tools/chafa/chafa.c Outdated Show resolved Hide resolved
tools/chafa/chafa.c Outdated Show resolved Hide resolved
tools/chafa/chafa.c Outdated Show resolved Hide resolved
tools/chafa/chafa.c Outdated Show resolved Hide resolved
tools/chafa/chafa.c Outdated Show resolved Hide resolved
tools/chafa/chafa.c Outdated Show resolved Hide resolved
tools/chafa/conhost.c Outdated Show resolved Hide resolved
tools/chafa/chafa.c Show resolved Hide resolved
@hpjansson hpjansson merged commit 6613819 into hpjansson:master Nov 11, 2023
1 check passed
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.

None yet

2 participants