mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
Configure StringNormalizer default_locale for _APPLE_ system (#17339)
### Description <!-- Describe your changes. --> As title. iOS language code uses different syntax for specifying language code/region code: https://developer.apple.com/documentation/xcode/choosing-localization-regions-and-scripts current `default_locale` is not working for iOS. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Issue: https://github.com/microsoft/onnxruntime/issues/17017 --------- Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net> Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
This commit is contained in:
parent
7af2f68ef3
commit
e11849e716
1 changed files with 10 additions and 1 deletions
|
|
@ -201,7 +201,16 @@ class Utf8Converter {
|
|||
|
||||
#endif
|
||||
|
||||
const std::string default_locale("en_US.UTF-8"); // All non-MS
|
||||
#if defined(__APPLE__)
|
||||
#include <TargetConditionals.h>
|
||||
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
|
||||
const std::string default_locale("en-US.UTF-8");
|
||||
#else
|
||||
const std::string default_locale("en_US.UTF-8"); // Other kinds of Apple Platforms including MacOS, etc
|
||||
#endif
|
||||
#else
|
||||
const std::string default_locale("en_US.UTF-8"); // All non-MS and not Apple
|
||||
#endif
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue