|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Utility functions for UTF-8 string conversion. More...
Functions | |
| MITKCORE_EXPORT std::string | Local8BitToUtf8 (const std::string &local8BitStr) |
| Convert a string encoded with the current code page to a UTF-8 encoded string (Windows). More... | |
| MITKCORE_EXPORT std::string | Utf8ToLocal8Bit (const std::string &utf8Str) |
| Convert a UTF-8 encoded string to a string encoded with the current code page (Windows). More... | |
Utility functions for UTF-8 string conversion.
| MITKCORE_EXPORT std::string mitk::Utf8Util::Local8BitToUtf8 | ( | const std::string & | local8BitStr | ) |
Convert a string encoded with the current code page to a UTF-8 encoded string (Windows).
The conversion happens on Windows only. On all other platforms, the input string is returned unmodified as it is assumed to be UTF-8 encoded already.
If the conversion fails, a warning is printed and the input string is returned instead. This matches the behavior before this method was introduced.
| [in] | local8BitStr | The string in the current system code page encoding. |
| MITKCORE_EXPORT std::string mitk::Utf8Util::Utf8ToLocal8Bit | ( | const std::string & | utf8Str | ) |
Convert a UTF-8 encoded string to a string encoded with the current code page (Windows).
The conversion happens on Windows only. On all other platforms, the input string is returned unmodified as strings are assumed to be always UTF-8 encoded by default.
If the conversion fails, a warning is printed and the input string is returned instead. This matches the behavior before this method was introduced.
| [in] | utf8Str | The UTF-8 encoded string. |