Replies: 5 comments 2 replies
-
Funny, I did not. The language was originally developed using 1-byte As you know, |
Beta Was this translation helpful? Give feedback.
-
The platform reads and writes UTF-8. Once imported, strings are translated into the native |
Beta Was this translation helpful? Give feedback.
-
A small performance impact given the cross-platform benefits. The conversion from UTF-8 to the OS representation (UTF-16 or UTF-32) is a single call using OS APIs. Internally all operations are done natively; no conversions from UTF-X to UTF-Y are required. When strings need to be written, they are converted to UTF-8 or ASCII, the same process the native operating systems follow. |
Beta Was this translation helpful? Give feedback.
-
Said another way, I choose not to work against the OS, Linux, macOS, and Windows. Instead, embrace their internal representation of character strings and gain performance benefits. All the platform targets support Unicode, a higher-level need. |
Beta Was this translation helpful? Give feedback.
-
Unices (including Linux and macOS) use UTF-8 for Unicode by default. Windows started from Windows 10 supports UTF-8 for Unicode (they don't introduce new APIs but reuse the old APIs for ANSI, e.g: CreateFileA now will use UTF-8 but not ANSI, after all they all use Update: Windows doesn't use UTF-8 for Unicode by default, it will need to be specified on the manifest file: https://learn.microsoft.com/vi-vn/windows/apps/design/globalizing/use-utf8-code-page p/s: this is only for the sake of updated information, I didn't persuade you to switch to UTF-8. |
Beta Was this translation helpful? Give feedback.
-
Let me guess, influenced by Java? Or the Windows API? Qt is the only library that uses UTF-16 for Unicode strings as I know.
Beta Was this translation helpful? Give feedback.
All reactions