https://github.com/egor-tensin/winapi-utf8
WinAPI: UTF-8 <-> UTF-16 conversion
https://github.com/egor-tensin/winapi-utf8
Last synced: 3 days ago
JSON representation
WinAPI: UTF-8 <-> UTF-16 conversion
- Host: GitHub
- URL: https://github.com/egor-tensin/winapi-utf8
- Owner: egor-tensin
- License: mit
- Created: 2020-10-03T09:06:22.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-28T19:12:00.000Z (over 1 year ago)
- Last Synced: 2025-03-01T07:18:44.446Z (7 months ago)
- Language: C++
- Homepage: https://egor-tensin.github.io/winapi-utf8/
- Size: 119 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
winapi-utf8
===========[](https://github.com/egor-tensin/winapi-utf8/actions/workflows/ci.yml)
UTF-8 <-> UTF-16 conversion functions, mainly to be used with WinAPI.
Usage
-----Include it in your CMake project and link to the `winapi_utf8` target.
Use the `narrow()` and `widen()` functions to convert to UTF-8 and UTF-16
respectively:#include
winapi::narrow(u"Привет"); // Returns the UTF-8 representation
winapi::widen(u8"Привет"); // Returns the UTF-16 representationSee the various convenience overloads of these function in the
[online documentation].[online documentation]: https://egor-tensin.github.io/winapi-utf8/utf8_8hpp.html
Development
-----------Build using CMake.
Depends on Boost.Test.
The project is Windows-only, so building with either MSVC or MinGW-w64 is
required.There's a Makefile with useful shortcuts to build the project in the build/
directory (defaults to building with MinGW-w64):make deps
make build
make testDocumentation
-------------Build & display the documentation using
make docs
View the online documentation at https://egor-tensin.github.io/winapi-utf8/.
License
-------Distributed under the MIT License.
See [LICENSE.txt] for details.[LICENSE.txt]: LICENSE.txt