I was using string literals with \u
encoded sequences, for passing them to QString::fromUtf8
, like in QString::fromUtf8("Precio (\u20AC/k)");
, with success, but, struggling my mind a bit, and reading cppreference and other sources, I have not clear how is the \u20AC
sequence translated in binary.
In other words, what is QString::fromUtf8
receaving in substitution of the \u20AC
sequence? The UTF-8 representation of the 20AC
codepoint? Its UTF-16 representation? Or what?
The most majority of the sources I've read says it is translated to its UTF-16 representation, which means that I'm doing wrong when passing that string to fromUtf8
, however, it has always worked fine.
Am I doing to right thing or not?