llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

(Windows) Set console to UTF-8 on init

Open anzz1 opened this issue 1 year ago • 1 comments

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 avatar Mar 23 '23 09:03 anzz1

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

lofcz avatar Mar 23 '23 12:03 lofcz

Can merge after conflicts are resolved

ggerganov avatar Mar 25 '23 20:03 ggerganov

your comit contains main.cpp file, but the master branch I cloned does not contain this file, how can I fix the bug?

Estelle-gqy avatar Aug 01 '24 03:08 Estelle-gqy