From: slaren Date: Mon, 28 Aug 2023 17:19:18 +0000 (+0200) Subject: llama-bench : set locale to utf8 (#2832) X-Git-Tag: gguf-v0.4.0~199 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=43033b7bb4858da4f591715b3babdf906c9b7cbc;p=pkg%2Fggml%2Fsources%2Fllama.cpp llama-bench : set locale to utf8 (#2832) --- diff --git a/examples/llama-bench/llama-bench.cpp b/examples/llama-bench/llama-bench.cpp index d0fe6d90..bf3a487a 100755 --- a/examples/llama-bench/llama-bench.cpp +++ b/examples/llama-bench/llama-bench.cpp @@ -3,6 +3,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -10,7 +13,6 @@ #include #include #include -#include #include #include @@ -916,6 +918,9 @@ static void llama_null_log_callback(enum llama_log_level level, const char * tex } int main(int argc, char ** argv) { + // try to set locale for unicode characters in markdown + setlocale(LC_CTYPE, ".UTF-8"); + #if !defined(NDEBUG) fprintf(stderr, "warning: asserts enabled, performance may be affected\n"); #endif