| 50 | } |
| 51 | |
| 52 | std::string EditorInterface::to_editor_encoding(std::wstring_view str) const { |
| 53 | switch (get_encoding()) { |
| 54 | case EditorCodepage::ansi: |
| 55 | return to_string(str); |
| 56 | case EditorCodepage::utf8: |
| 57 | return to_utf8_string(str); |
| 58 | case EditorCodepage::COUNT: |
| 59 | break; |
| 60 | } |
| 61 | throw std::runtime_error("Unsupported encoding"); |
| 62 | } |
| 63 | |
| 64 | MappedWstring EditorInterface::to_mapped_wstring(const std::string &str) { |
| 65 | if (get_encoding() == EditorCodepage::utf8) |
no test coverage detected