Bring UTF-8 back to x86 kit
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 4.8k
- Forks
- 381
- PR merge metrics
- No merged PRs in 30d
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the x86 kit integration for utf8.manifest and utf8.rc, then compare it with the conforming manifest and resource definitions shown in the issue. Build the x86 kit and verify that an executable using the manifest reports UTF-8 as its active code page on Windows XP and newer Windows versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100