Created
July 18, 2022 12:41
-
-
Save unarist/0bfbb9361189a419cdd058e911c6bb4d to your computer and use it in GitHub Desktop.
ImHex pattern for https://github.com/dotnet/runtime/blob/v6.0.7/src/libraries/System.Text.Encoding.CodePages/src/Data/codepages.nlp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// structures are based on https://github.com/dotnet/runtime/blob/v6.0.7/src/libraries/System.Text.Encoding.CodePages/src/System/Text/BaseCodePageEncoding.cs | |
struct CodePageHeader { | |
char16 codePageName[16]; | |
u16 version[4]; | |
u16 codePage; | |
u16 byteCount; | |
u32 offset; | |
u16 unicodeReplace; | |
u16 byteReplace; | |
}; | |
struct NLSPlusHeader { | |
char16 filename[16]; | |
u16 version[4]; | |
u16 count; | |
padding[2]; | |
}; | |
struct NLSCodePageIndex { | |
char16 codePageName[16]; | |
u16 codePage; | |
u16 byteCount; | |
CodePageHeader *offset: u32; | |
}; | |
NLSPlusHeader header @ 0x00; | |
NLSCodePageIndex index[header.count] @ $; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment