| 117 | } |
| 118 | |
| 119 | QString EncodingUtils::replaceDiacriticsWithASCII(const QString &str) const { |
| 120 | QString output; |
| 121 | for (int i = 0; i < str.length(); i++) { |
| 122 | QChar c = str[i]; |
| 123 | int dIndex = diacritics.indexOf(c); |
| 124 | if (dIndex < 0) { |
| 125 | output.append(c); |
| 126 | } else { |
| 127 | QString replacement = replacements[dIndex]; |
| 128 | output.append(replacement); |
| 129 | } |
| 130 | } |
| 131 | return output; |
| 132 | } |
| 133 | |
| 134 | QString EncodingUtils::detectBufferEncoding(const QByteArray &buffer) const { |
| 135 | QTextCodec::ConverterState state; |
no outgoing calls
no test coverage detected