From e5dcdabbb8b8540e8c48b575adaaeb7eebff3fb4 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 23 Nov 2022 08:24:29 +0200 Subject: [PATCH] unicode : fix character replacement (thanks to @tamo) --- examples/main/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 204703c..a1b9825 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -390,9 +390,9 @@ bool output_wts(struct whisper_context * ctx, const char * fname, const char * f ncnt += txt.size(); } - ::replace_all(txt_bg, "'", "’"); + ::replace_all(txt_bg, "'", "\u2019"); ::replace_all(txt_bg, "\"", "\\\""); - ::replace_all(txt_fg, "'", "’"); + ::replace_all(txt_fg, "'", "\u2019"); ::replace_all(txt_fg, "\"", "\\\""); }