libutf8, a C++ library to seamlessly handle UTF-8 strings

Introduction

libutf8 to seamlessly handle UTF-8 in C++This project is a C++ library used to seamlessly handle UTF-8 strings. It offers very easy to use functions to convert characters and strings between UTF-32 and UTF-8.

The library also includes a string iterator to go through a UTF-8 string without having to first convert it to a UTF-32 string (which saves you a malloc() and free() and up to 4x the space the original string in memory saving.)

Later we intend to add support for UTF-16.

Download

The source is available on github in our project git.

On Ubuntu, you may want to install it from our Snap! C++ Launchpad PPA. In that case, add the repository this way:

sudo add-apt-repository ppa:snapcpp/ppa
sudo apt-get update

Then install one of the library packages with the install command:

sudo apt-get install libutf8
sudo apt-get install libutf8-dev
sudo apt-get install libutf8-doc

List of currently available Snap! C++ packages.

Support

You got a problem with the library? An idea to improve it? Please post a ticket in the Support area of Github.

Requirements

We use the following to build the libutf8 library:

Documentation

The libutf8-doc package includes all the documentation on how to use the library. It was extracted using Doxygen.

Coverage Tests

The library comes with a unit test which attempts to keep the coverage as close as possible to 100%. The test results can be found on lcov.snapwebsites.org/libutf8/.

Origin

This library was originally developed for wpkg.

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly