[PATCH] Improve selecte Set Encoding (Automatic Detection for Japanese)
David Faure
dfaure at klaralvdalens-datakonsult.se
Mon Jan 20 14:08:20 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sunday 19 January 2003 15:25, Toshitaka Fujioka wrote:
> I attached a new patch.
+ else if ( name.lower() == "cp1250" || name.lower() == "ibm852" || name.lower() == "iso-8859-2" || name.lower() == "iso-8859-3" ) {
+ language = khtml::Decoder::CentralEuropean;
+ }
+ else if ( name.lower() == "cp1251" || name.lower() == "koi8-r" || name.lower() == "iso-8859-5" ) {
+ language = khtml::Decoder::Russian;
+ }
etc.
Very slow - you're transforming name to lowercase 20 times.
Use name = name.lower(); on top, so that it's done only once.
- --
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Klarälvdalens Datakonsult AB, Platform-independent software solutions
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+LALU72KcVAmwbhARAqObAJ9UXPT+V8gAY1GKrZnLcmxQe7bCgACeJo6t
urK7x82Xhi3ELHO8sjbTx0Q=
=9zMp
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list