]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
unicode : fix character replacement (thanks to @tamo)
authorGeorgi Gerganov <redacted>
Wed, 23 Nov 2022 06:24:29 +0000 (08:24 +0200)
committerGeorgi Gerganov <redacted>
Wed, 23 Nov 2022 06:24:29 +0000 (08:24 +0200)
examples/main/main.cpp

index 204703c4d9de25c916823de7c7e170a277d3ef47..a1b98253ea837a95e25cdcf26d8e0fd8590367c4 100644 (file)
@@ -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, "\"", "\\\"");
             }