[Development] Prettier printing of Unicode strings

Thiago Macieira thiago.macieira at intel.com
Mon Jan 27 00:03:56 CET 2014


On domingo, 26 de janeiro de 2014 20:17:20, Knoll Lars wrote:
> I usually prefer the output in utf8, as it gives readable strings (at
> least on Mac and Linux as long as you don¹t mess with the locale). Escaped
> strings are much more tedious to debug for me in most cases. So I¹d like
> to ask for at least an option to get utf8 strings as output, and only
> escape non printable chars.

The problem is that Unicode can trick your eyes:

Actual   (s1): Thiago José Macieira / Lars Knoll
Expected (s2): Thiago José Macieira ∕ Lаrs Knoll

Can you tell the difference with your eyes? There's a reason that IDNA requires 
lengthy transformations in the NamePrep stage and requires registrars to apply 
anti-homographic rules.

With my change as it is, you'd see:
Actual   (s1): Thiago Jos\u00E9 Macieira / Lars Knoll
Expected (s2): Thiago Jose\u0301 Macieira \u2215 L\u0430rs Knoll

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140126/58283a5b/attachment.sig>


More information about the Development mailing list