Pages
API Documentation
On this page

KCodecs

Text encoding.

KCodecs provide a collection of methods to manipulate strings using various encodings.

It can automatically determine the charset of a string, translate XML entities, validate email addresses, and find encodings by name in a more tolerant way than QTextCodec (useful e.g. for data coming from the Internet).

Using the Module

Using a Qt module's C++ API requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake.

Building with CMake

Use the find_package() command to locate the needed module component in the Qt6 package:

find_package(Qt6 REQUIRED COMPONENTS KF6)
target_link_libraries(mytarget PRIVATE Qt6::KF6)

For more details, see the Build with CMake overview.

API Reference

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.