Skip to content

fix for windows utf-8 input #840

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

Merged
merged 2 commits into from
Apr 8, 2023

Conversation

aroidzap
Copy link
Contributor

@aroidzap aroidzap commented Apr 7, 2023

When trying to input UTF-8 characters into Windows console, multibyte characters are interpreted as 0 (zeros) and text is cut off, because internal implementation relies on char *.

To fix this issue, console input must be set to wide characters (UTF-16) and then converted into UTF-8 string.

@aroidzap aroidzap force-pushed the fix-windows-uft-8-input branch from f41fdbe to 68df15c Compare April 8, 2023 00:22
@prusnak
Copy link
Collaborator

prusnak commented Apr 8, 2023

@LainNya does this fix #646 for you?

@OllanTaytambur does this fix #831 for you?

@aroidzap aroidzap force-pushed the fix-windows-uft-8-input branch from 92925ad to 4598aa8 Compare April 8, 2023 11:18
@tomsnunes
Copy link

@prusnak this PR indeed fix all the utf-8 issues on Windows to me. Great work @aroidzap!

tomsnunes added a commit to tomsnunes/alpama.cpp that referenced this pull request Apr 8, 2023
@prusnak prusnak merged commit aaf3b23 into ggml-org:master Apr 8, 2023
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.

3 participants