Skip to content

Commit

Permalink
fix: read mdd format
Browse files Browse the repository at this point in the history
  • Loading branch information
mumu-lhl committed Aug 12, 2024
1 parent efffc04 commit 4adc203
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/dict_reader_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,16 @@ class DictReader {
keyBlock.sublist(keyStartIndex + _numberWidth, keyEndIndex);
late String keyText;

if (_encoding == "UTF-16") {
if (_encoding == "UTF-16" && _mdx) {
keyText = utf16.decode(keyEncoded);
} else {
keyText = utf8.decode(keyEncoded);
}

if (!_mdx) {
keyText = keyText.replaceFirst(r"\", "");
}

keyStartIndex = keyEndIndex + width;

keyList.add((keyId, keyText));
Expand Down

0 comments on commit 4adc203

Please sign in to comment.