On quinta-feira, 24 de maio de 2012 12.05.47, 1+1=2 wrote:
> When QT_NO_TEXTCODEC is defined, default codec is
> QTextCodec::codecForLocale(), but can be changed using
> QTextStream::setCodec().

I don't see the need to change then. It should remain the locale.

> When QT_NO_TEXTCODEC isn't defined, QString::fromLatin1()
> /QString::toLocal8Bit() is used, and they can't canged by users. I
> think this is broken for non-latin1-locale users. If they want to
> read/write the same file, it indeed will screw up user data ;-)

You misunderstand Latin 1 then. If you read the contents with Latin1 and write
using Latin1, you get exactly what you had before. No data is lost.

That's a good behaviour, since there is no QTextCodec to change the codec.

For user applications (that is, other than qmake, moc, uic, etc.) that turned
off QTextCodec, there's nothing that we can do. If you turn off the concept of
codecs, then you can't change it.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to