https://github.com/tats-u/forceu8exe
CLI tool that embeds Windows executable a manifest that forces UTF-8 in ANSI API
https://github.com/tats-u/forceu8exe
cli-app cli-tool cpp-tool rust utf-8 visualcplusplus visualcpp windows windows-cli
Last synced: 9 months ago
JSON representation
CLI tool that embeds Windows executable a manifest that forces UTF-8 in ANSI API
- Host: GitHub
- URL: https://github.com/tats-u/forceu8exe
- Owner: tats-u
- License: mit
- Created: 2020-04-29T10:57:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-03T09:51:35.000Z (over 5 years ago)
- Last Synced: 2025-02-08T12:16:14.446Z (11 months ago)
- Topics: cli-app, cli-tool, cpp-tool, rust, utf-8, visualcplusplus, visualcpp, windows, windows-cli
- Language: Rust
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Force UTF-8 Tool for Windows Executables (forceu8exe)
This tool embeds a manifest that force I/O using UTF-8 on Widows executables.
They usually performe I/O using legacy encoding (e.g. ISO-8859-1 / Shift-JIS / GBK) by default.
To force Unicode on them, we have to use UTF-16 (wide characters) API instead.
However, other OSes allow us to use UTF-8 and Unicode in narrow strings.
This tool give Windows executables compatibility with other OSes.
# Prerequirements
- Windows SDK in Visual C++ (mt.exe)
- Cargo (the package manager of Rust)
# How to use
Add Cargo and `mt.exe` in PATH in advance. x64 Native Tools Command Prompt seems to be the most easily accessible.
```pwsh
cargo install --git https://github.com/tats-u/forceu8exe.git
forceu8exe apply [path of .exe file]
```
You can also output the manifest to a file like (e.g. `foobar.exe.manifest`):
```pwsh
forceu8exe manifest foobar.exe.manifest
```
```cmake
# snip
add_executable(
foobar
foobar.exe
foobar.exe.manifest # Append here
)
# snip
```
# License
MIT