[Development] QString::fromAscii & toAscii's future

Robin Burchell robin+qt at viroteck.net
Tue Apr 24 15:45:01 CEST 2012


2012/4/24 Thiago Macieira <thiago.macieira at intel.com>:
> My recommendation is a variant of options 3: we document that it accepts only
> US-ASCII and that it has undefined behaviour when the input isn't US-ASCII
> compliant. That way, we can make it be equal to toLatin1() and avoid having to
> write code for checking the high bit.

I'd agree with that. I don't know what the pain of making it
strict-ASCII would be in existing code (at least, I've seen it used
far more often than I like), but we can teach people to use it
properly at the very least.



More information about the Development mailing list