Fix passing gb2312 encoded strings to tts on Windows (#1819)
This commit is contained in:
@@ -127,6 +127,18 @@ void ToLowerCase(std::string *in_out);
|
||||
std::string RemoveInvalidUtf8Sequences(const std::string &text,
|
||||
bool show_debug_msg = false);
|
||||
|
||||
// Return true if text contains valid utf8 sequence.
|
||||
// Return false otherwise
|
||||
bool IsUtf8(const std::string &text);
|
||||
|
||||
// Return true if text contains valid gb2312 encoded sequence
|
||||
// Return false otherwise
|
||||
bool IsGB2312(const std::string &text);
|
||||
|
||||
#if defined(_WIN32)
|
||||
std::string Gb2312ToUtf8(const std::string &text);
|
||||
#endif
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
|
||||
#endif // SHERPA_ONNX_CSRC_TEXT_UTILS_H_
|
||||
|
||||
Reference in New Issue
Block a user