{"record":{"id":"fb1d09b599ed2a49","repo":"studyzy/imewlconverter","slug":"error-fb1d09","errorCode":null,"errorMessage":"未能成功解析任何词条,可能是文件格式不兼容或文件已损坏","messagePattern":"未能成功解析任何词条,可能是文件格式不兼容或文件已损坏","errorType":"exception","errorClass":"InvalidDataException","httpStatus":null,"severity":"error","filePath":"src/ImeWlConverter.Formats/Win10MsSelfStudy/Win10MsPinyinSelfStudyImporter.cs","lineNumber":83,"sourceCode":"                var pyIndex = BitConverter.ToInt16(pyIndexBytes, 0);\n\n                if (pyIndex >= 0 && pyIndex < PinyinTable.Length)\n                    pinyin[j] = PinyinTable[pyIndex];\n                else\n                    pinyin[j] = \"a\";\n            }\n\n            results.Add(new WordEntry\n            {\n                Word = word,\n                Rank = 0,\n                CodeType = CodeType.Pinyin,\n                Code = WordCode.FromSingle(pinyin)\n            });\n        }\n\n        if (results.Count == 0)\n            throw new InvalidDataException(\"未能成功解析任何词条,可能是文件格式不兼容或文件已损坏\");\n\n        return results;\n    }\n\n    internal static readonly string[] PinyinTable =\n    {\n        \"a\", \"ai\", \"an\", \"ang\", \"ao\",\n        \"ba\", \"bai\", \"ban\", \"bang\", \"bao\", \"bei\", \"ben\", \"beng\", \"bi\", \"bian\",\n        \"biao\", \"bie\", \"bin\", \"bing\", \"bo\", \"bu\",\n        \"ca\", \"cai\", \"can\", \"cang\", \"cao\", \"ce\", \"cen\", \"ceng\",\n        \"cha\", \"chai\", \"chan\", \"chang\", \"chao\", \"che\", \"chen\", \"cheng\", \"chi\",\n        \"chong\", \"chou\", \"chu\", \"chua\", \"chuai\", \"chuan\", \"chuang\", \"chui\", \"chun\", \"chuo\",\n        \"ci\", \"cong\", \"cou\", \"cu\", \"cuan\", \"cui\", \"cun\", \"cuo\",\n        \"da\", \"dai\", \"dan\", \"dang\", \"dao\", \"de\", \"dei\", \"den\", \"deng\", \"di\",\n        \"dia\", \"dian\", \"diao\", \"die\", \"ding\", \"diu\", \"dong\", \"dou\", \"du\", \"duan\",\n        \"dui\", \"dun\", \"duo\",\n        \"e\", \"ei\", \"en\", \"eng\", \"er\",\n        \"fa\", \"fan\", \"fang\", \"fei\", \"fen\", \"feng\", \"fiao\", \"fo\", \"fou\", \"fu\",","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/studyzy/imewlconverter/blob/16744a12ed5064896cf39095163e44b367aaada1/src/ImeWlConverter.Formats/Win10MsSelfStudy/Win10MsPinyinSelfStudyImporter.cs#L65-L101","documentation":"After looping over all candidate entries, if NOT A SINGLE word was successfully parsed (results.Count == 0) the importer throws InvalidDataException. The file passed the size and count checks, but every entry was skipped (invalid word length, or out-of-bounds) — i.e. a format that looks structurally plausible at the header level but whose per-entry 60-byte layout does not match.","triggerScenarios":"A file >= 9216 bytes with a plausible count, but the per-entry layout (word length at curIdx+10, word bytes at curIdx+12, 60-byte stride) does not match — e.g. an incompatible Windows/Office build's self-study format where the entry offsets shifted.","commonSituations":"Windows or Office version mismatch that changed the internal entry layout; a partially-compatible file that fools the header checks but fails every entry parse; a corrupt file whose count is plausible but entry region is damaged.","solutions":["Confirm the Windows/Office version that produced the file matches what the importer supports.","Re-export the self-study .dat from a supported IME build.","If developing the importer, verify the entry offsets (curIdx+10 for length, curIdx+12 for word, EntrySize=60) against the actual format of the producing build."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { var entries = importer.ParseBinary(stream, ct); }\ncatch (InvalidDataException ex) { ReportError($\"no entries parsed, likely version mismatch: {ex.Message}\"); }","preventionTips":["Match the Windows/Office build that produced the file to what the importer supports.","Keep a known-good self-study sample to regression-test entry offsets.","When developing, verify curIdx+10 (length) and curIdx+12 (word) against the real format."],"tags":["win10","mspy","binary","import","empty"],"backgroundTag":null,"analyzedSha":"16744a12ed5064896cf39095163e44b367aaada1","analyzedAt":"2026-08-13T19:53:09.031Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}