Skip to content

Anas-Hamdane/utf8conv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

utf8conv

utf8conv is a lightweight utility for converting between wide-character strings (std::wstring or wchar_t*) and standard strings (std::string or char*) encoded as UTF-8, without relying on system locales.

It is designed for environments where consistent, locale-independent string handling is critical—such as embedded systems or any context where locale setup is unreliable or unavailable.

Notes

  • Supports only UTF-8 encoded strings
  • Assumes that only Windows uses UTF-16 encoded wchar_t
  • All other platforms are treated as using UTF-32 encoded wchar_t
  • Does not depend on system locales
  • Replaces invalid sequences with ?

Integration

  • Header-only (.hpp) for C++ projects
  • Compatible .h/.c implementation for pure C projects

About

utf8 string <-> wide string conversion

Resources

License

Stars

Watchers

Forks

Contributors