From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:ICU data file (icudt)" |
|---|
| claim | "ICU DataHeader = MappedData {uint16 headerSize; uint8 magic1 0xDA; uint8 magic2 0x27} followed by UDataInfo (20 bytes: uint16 size, uint16 reservedWord, uint8 isBigEndian, uint8 charsetFamily, uint8 sizeofUChar, uint8 reservedByte, uint8 dataFormat[4], uint8 formatVersion[4], uint8 dataVersion[4]). The uint16 fields (headerSize, size) are stored in the byte order given by isBigEndian (0 little, 1 big) and ICU swaps them when it differs from the host; the data begins headerSize bytes from the start (headerSize can exceed 24 when extra header bytes such as a copyright string follow)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:ICU data file (icudt)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "DataHeader" |
|---|
| size_min | 24 |
|---|
| fields | | offset | 0 |
|---|
| name | "headerSize" |
|---|
| type | "uint16" |
|---|
|
| offset | 2 |
|---|
| name | "magic1" |
|---|
| type | "uint8" |
|---|
|
| offset | 3 |
|---|
| name | "magic2" |
|---|
| type | "uint8" |
|---|
|
| offset | 4 |
|---|
| name | "info.size" |
|---|
| type | "uint16" |
|---|
|
| offset | 6 |
|---|
| name | "info.reservedWord" |
|---|
| type | "uint16" |
|---|
|
| offset | 8 |
|---|
| name | "info.isBigEndian" |
|---|
| type | "uint8" |
|---|
|
| offset | 9 |
|---|
| name | "info.charsetFamily" |
|---|
| type | "uint8" |
|---|
|
| offset | 10 |
|---|
| name | "info.sizeofUChar" |
|---|
| type | "uint8" |
|---|
|
| offset | 11 |
|---|
| name | "info.reservedByte" |
|---|
| type | "uint8" |
|---|
|
| offset | 12 |
|---|
| name | "info.dataFormat" |
|---|
| type | "uint8[4]" |
|---|
|
| offset | 16 |
|---|
| name | "info.formatVersion" |
|---|
| type | "uint8[4]" |
|---|
|
| offset | 20 |
|---|
| name | "info.dataVersion" |
|---|
| type | "uint8[4]" |
|---|
|
|
|---|
| endianness | "mixed: follows info.isBigEndian (byte 8; 0 little, 1 big); the 4 bytes at 0-3 and the byte fields are order independent, headerSize and info.size/reservedWord are swapped when it differs from the host" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "MappedData, DataHeader, and udata.h UDataInfo field list" |
|---|
| repo | "https://github.com/unicode-org/icu" |
|---|
| commit | "ad484f3d6c036ba06193ac7c3bc2233a53ab68b8" |
|---|
| path | "icu4c/source/common/ucmndata.h" |
|---|
|
| type | "source" |
|---|
| detail | "udata_getHeaderSize swaps headerSize when info.isBigEndian != U_IS_BIG_ENDIAN; UDataInfo definition with the field order and sizes; toc computed as pHeader + udata_getHeaderSize." |
|---|
| repo | "https://github.com/unicode-org/icu" |
|---|
| commit | "ad484f3d6c036ba06193ac7c3bc2233a53ab68b8" |
|---|
| path | "icu4c/source/common/unicode/udata.h" |
|---|
| lines | "116-153" |
|---|
|
| type | "source" |
|---|
| detail | "ucmndata.h declares DataHeader {MappedData dataHeader; UDataInfo info;} (4+20 bytes) and udata_getHeaderSize/udata_getInfoSize documented as handling opposite-endian data; udata.h UDataInfo comment 'isBigEndian: 0 for little-endian machine, 1 for big-endian'." |
|---|
| repo | "https://github.com/unicode-org/icu" |
|---|
| commit | "ad484f3d6c036ba06193ac7c3bc2233a53ab68b8" |
|---|
| path | "icu4c/source/common/ucmndata.h" |
|---|
| lines | "36-72" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "DataHeader" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T18:05:06.176Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T07:51:35.428Z" |
|---|
| summary | "headerSize and info.size are in the file's byte order given by isBigEndian (byte 8): ICU byte-swaps headerSize when it differs from the host. headerSize is the real header length (>= 24) and the…" |
|---|
| changed | |
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T17:24:23.747Z" |
|---|
| summary | "Add data.endianness: the uint16 fields follow UDataInfo.isBigEndian (byte 8), as udata_getHeaderSize/udata_getInfoSize 'handle opposite-endian data' in ucmndata.h; sizes check: MappedData 4 +…" |
|---|
| changed | |
|---|
|
|
|---|