https://sourceware.org/bugzilla/show_bug.cgi?id=30382
Bug ID: 30382 Summary: Add LD option for using UTF-8 code page in generated Windows PE binaries Product: binutils Version: 2.39 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: pali at kernel dot org Target Milestone: --- Windows PE binaries generated by LD use by default legacy code page (e.g. CP1252) when working with any char* WinAPI function, including argv[] arguments in main. Legacy code pages do not support whole range of UNICODE characters and therefore passing non-ASCII filename via argv[] to main() loose processing of command line arguments. UTF-8 is now widely used, so LD should support generating Windows PE binaries in a way that are marked as UTF-8 compatible. Windows OS then will use UTF-8 as code page for all char* WinAPI function and will pass argv[] to main() in UTF-8 too. Switching code page to specific one for Windows PE binary is done by adding activeCodePage element into manifest. So please add some LD switch --active-code-page= for specifying code page which will be put into the final generated Windows PE binary. It should be considered for future that LD sets this --active-code-page= automatically to UTF-8 by default for all Windows PE binaries as usage of legacy code pages in application runtime is nowadays in UTF-8 ere just legacy. Please note that LD currently does not support manifests at all: https://sourceware.org/bugzilla/show_bug.cgi?id=30381 -- You are receiving this mail because: You are on the CC list for the bug.