[Development] Why can't QString use UTF-8 internally?

Thiago Macieira thiago.macieira at intel.com
Wed Feb 11 17:13:32 CET 2015

On Wednesday 11 February 2015 10:32:22 Mark Gaiser wrote:
> > Have you tried to uppercase or lowercase a string using only the Standard
> > Library?
> std::string s("hello");
> std::transform(s.begin(), s.end(), s.begin(), ::toupper);
> and
> std::transform(s.begin(), s.end(), s.begin(), ::tolower);
> Not sure about the performance though

That's flawed by construction. Uppercasing and lowercasing are string 
operations, since it can change length, *especially* if you do it in UTF-8.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list