| 12 | using namespace EE::UI::Doc; |
| 13 | |
| 14 | TextFormat::Encoding encodingFromString( const std::string_view& str ) { |
| 15 | if ( str == "utf16be" ) |
| 16 | return TextFormat::Encoding::UTF16BE; |
| 17 | if ( str == "utf16le" ) |
| 18 | return TextFormat::Encoding::UTF16LE; |
| 19 | if ( str == "win1252" ) |
| 20 | return TextFormat::Encoding::Latin1; |
| 21 | if ( str == "shiftjis" ) |
| 22 | return TextFormat::Encoding::Shift_JIS; |
| 23 | if ( str == "utf8" ) |
| 24 | return TextFormat::Encoding::UTF8; |
| 25 | return TextFormat::Encoding::UTF8; |
| 26 | } |
| 27 | |
| 28 | UTEST( TextFormat, autodetect ) { |
| 29 | FileSystem::changeWorkingDirectory( Sys::getProcessPath() ); |
no outgoing calls
no test coverage detected