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

(Windows) Set console to UTF-8 on init #420

Merged
merged 3 commits into from
Mar 25, 2023
Merged

(Windows) Set console to UTF-8 on init #420

merged 3 commits into from
Mar 25, 2023

Conversation

anzz1
Copy link
Contributor

@anzz1 anzz1 commented Mar 23, 2023

From my testing this fixes the problems with UTF-8 inputs and outputs.

I dislike having to add this platform-specific code but it has to be done for it to work properly.
The only other option would be guiding users to go deep into settings to enable a "beta" UTF-8 feature...sigh.

At least is wrapped somewhat nicely as its' own function outside the main loop.

@anzz1 anzz1 requested review from blackhole89, ggerganov and Green-Sky and removed request for blackhole89 and ggerganov March 23, 2023 09:14
@anzz1 anzz1 added the bug Something isn't working label Mar 23, 2023
Copy link
Collaborator

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

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

looks ok, but i am on linux only right now, so if someone on windows could confirm this works please....

@lofcz
Copy link

lofcz commented Mar 23, 2023

tested on win, LGTM. Considering the previous UTF-8 hack this replaces, I'd say it's better done this way.

main.cpp Outdated Show resolved Hide resolved
Co-authored-by: Jed Fox <git@jedfox.com>
@ggerganov
Copy link
Owner

Can merge after conflicts are resolved

@anzz1 anzz1 merged commit 34ab526 into master Mar 25, 2023
@anzz1 anzz1 deleted the patch-win-utf8 branch March 25, 2023 21:09
Deadsg pushed a commit to Deadsg/llama.cpp that referenced this pull request Dec 19, 2023
Only concatenate after all batches are done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants