| 401 | } |
| 402 | |
| 403 | String shiftJISToUTF32( const std::string_view& shiftJISString ) { |
| 404 | String string; |
| 405 | auto* ret = Window::Engine::instance()->getPlatformHelper()->iconv( |
| 406 | "UTF-32LE", "SHIFT-JIS", shiftJISString.data(), shiftJISString.size() ); |
| 407 | if ( ret ) { |
| 408 | string = String( reinterpret_cast<String::StringBaseType*>( ret ) ); |
| 409 | Window::Engine::instance()->getPlatformHelper()->iconvFree( ret ); |
| 410 | } |
| 411 | return string; |
| 412 | } |
| 413 | |
| 414 | static constexpr int codepointSize( TextFormat::Encoding enc ) { |
| 415 | switch ( enc ) { |
no test coverage detected