#includeIn this example, a QString object is created with a Latin-1 encoded string. The `toUtf8()` function is used to convert the string to a UTF-8 format and the result is output using the `qDebug()` function. Package library: Qt.#include int main() { QString latin1String("Hello World in Latin-1: \xc5\xbdivjo svet!"); qDebug() << latin1String.toUtf8(); // Convert to UTF-8: "Hello World in Latin-1: Živjo svet!" return 0; }