Skip to content

Fix incorrect encoding mappings for CP932 and CP936#46

Merged
mdsteele merged 1 commit intomdsteele:masterfrom
CNDspace:master
Feb 13, 2026
Merged

Fix incorrect encoding mappings for CP932 and CP936#46
mdsteele merged 1 commit intomdsteele:masterfrom
CNDspace:master

Conversation

@CNDspace
Copy link
Contributor

Summary

  • Fix CP932 (Windows Japanese) mapping from EUC_JP to SHIFT_JIS - these are two distinct Japanese encodings with incompatible byte sequences
  • Fix CP936 (Windows Chinese Simplified) mapping from BIG5 to GBK - Big5 is Traditional Chinese (CP950), while GBK is Simplified Chinese

Details

The encoding() method in codepage.rs had two incorrect mappings that would cause data corruption when decoding/encoding strings in MSI files using these code pages:

Code Page Before (wrong) After (correct)
CP932 (Shift_JIS) encoding_rs::EUC_JP encoding_rs::SHIFT_JIS
CP936 (GBK) encoding_rs::BIG5 encoding_rs::GBK

@CNDspace CNDspace marked this pull request as draft February 13, 2026 11:47
@CNDspace CNDspace marked this pull request as ready for review February 13, 2026 11:47
@mdsteele mdsteele merged commit 119af6b into mdsteele:master Feb 13, 2026
4 checks passed
@mdsteele
Copy link
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants