From: Georgi Gerganov Date: Wed, 23 Nov 2022 06:24:29 +0000 (+0200) Subject: unicode : fix character replacement (thanks to @tamo) X-Git-Tag: upstream/1.7.4~1813 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=e5dcdabbb8b8540e8c48b575adaaeb7eebff3fb4;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp unicode : fix character replacement (thanks to @tamo) --- diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 204703c4..a1b98253 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, "\"", "\\\""); }