[Development] HEADS-UP: QStringLiteral

Thiago Macieira thiago.macieira at intel.com
Fri Aug 23 03:35:38 CEST 2019


On Thursday, 22 August 2019 14:43:48 PDT Ville Voutilainen wrote:
> > In any case, we could advocate for utf8 being the input encoding when
> > writing Qt based code/projects or even make it the default. I wanted to
> > do that for Qt 5.0, but we couldn’t because MSVC didn’t support it at
> > that time. It does now however.
> I must wonder.. are the benefits of that really that useful? I suppose
> it's nice that you can just write utf-8 in your plain literals, but I
> wonder why
> a u"literal" is overly burdensome.

It's not.

The point is that you can't write u"Fußball Résumé" unless the source file is 
encoded in UTF-8, if you hope to share it with other people.

You'd have to write u"Fu\u00DFball R\u00E9sum\u00E9".

PS: to write "ß" and "é", I type <AltGr+s> and <dead_acute> <e> respectively. 
to type "\u00DF" and "\u00E9", I opened kcharselect, typed the characters that 
I already knew I wanted and searched. 

PPS: I can type "ę", "°", "ª", "€", "£", "¥", "č", "ā", "æ", "©", "™", "⁴" 
with just the keyboard. "us(alt-intl)+latin" rules.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products






More information about the Development mailing list