Skip to content

Commit

Permalink
llama-bench : set locale to utf8 (#2832)
Browse files Browse the repository at this point in the history
  • Loading branch information
slaren authored Aug 28, 2023
1 parent 6b73ef1 commit 43033b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/llama-bench/llama-bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
#include <cassert>
#include <chrono>
#include <cinttypes>
#include <clocale>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iterator>
#include <map>
#include <numeric>
#include <regex>
#include <sstream>
#include <stdio.h>
#include <string>
#include <vector>

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 43033b7

Please sign in to comment.