-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Description
The UTF-8 feature was disabled in x86 kit because Windows XP won't load exe files with the UTF-8 manifest. (#58)
After some investigation, I dramatically found that Microsoft gave a non-conforming manifest in their document for UTF-8 code page.
The correct info is available here. With the conforming manifest, the exe does work on Windows XP.
utf8.manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">
<activeCodePage>UTF-8</activeCodePage>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>utf8.rc
#include <winuser.h>
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "utf8.manifest"
test.c
#include <stdio.h>
#include <windows.h>
int main()
{
printf("Current code page: %u\n", GetACP());
}
To compile:
windres utf8.rc -O coff -o utf8.o
gcc test.c utf8.o -o test.exe
Peter0x44, stianhoiland and imweijh
Metadata
Metadata
Assignees
Labels
No labels
