0cb742dafb
Rewrite with hard-coded offsets into the PE file format to discern if a binary is PE32 or PE32+, and then to determine if it contains a "CLR Data Directory" entry that looks valid. Tested with PE32 and PE32+ compiled Mono binaries, PE32 and PE32+ native binaries, and a random assortment of garbage files. Former-commit-id: 9e7ac86ec84f653a2f79b87183efd5b0ebda001b
* GB18030 support GB18030Encoding requires an assembly resource named "gb18030.table". This resource can be generated from "GB18030Source.exe" with an external resource "gb18030-2000.xml": http://dev.icu-project.org/cgi-bin/viewcvs.cgi/*checkout*/charset/data/xml/gb-18030-2000.xml - or - http://monkey.workarea.jp/mono/unicode/gb-18030-2000.xml To create GB18030Source.exe, compile GB18030Source.cs as a standalone module: mcs GB18030.cs /unsafe /d:BUILD_GENERATOR and then run: mono GB18030.exe It expects that gb18030-2000.xml is in the same directory, and generates a binary file "gb18030.table". This table file is included as a resource in this assembly. Atsushi Eno <atsushi@ximian.com>