Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dkosmari/utf-cpp

utf-cpp - A C++ library to perform Unicode conversions.

This library is intended to perform conversions between UTF-8, UTF-16 and UTF-32 text:

namespace utf {
 std::u8string to_utf8(...); // convert to UTF-8
 
 std::u16string to_utf16(...); // convert to UTF-16
 
 std::u32string to_utf32(...); // convert to UTF-32
 
 std::string to_string(...); // also convert to UTF-8, but the return type is std::string
}

No other function, such as text processing, character classification, normalization, BOM, etc is performed.

The use case is whenever you need to perform conversion to massage data passed around between libraries, and you don't have (or don't want to use) existing general-purpose text encoding conversions:

  • iconv() isn't always available in embedded systems; when statically linked, it adds all conversion tables to the executable, even the non-Unicode ones.

  • ICU will solve all your Unicode needs, but it's massive.

Utf-cpp is licensed under multiple licenses, you can choose which one to abide:

About

A C++ library to perform Unicode conversions.

Topics

Resources

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
COPYING.APLv2
GPL-3.0
COPYING.GPLv3
MIT
COPYING.MIT

Stars

Watchers

Forks

Releases

No releases published

Contributors

AltStyle によって変換されたページ (->オリジナル) /