Version: 2.4 alpha2 (Calligra 2.4 alpha2) (using KDE 4.6.0) OS: Linux Trying to set a field's data source to a calculated value, results in international characters displaying jibrish. Reproducible: Always Steps to Reproduce: Add a field on a report. set the field's data source to ="JIM" (include equal sign and quotes) Add another field on the same report. set the field's data source to ="ΔΗΜΗΤΡΙΟΣ" (include equal sign and quotes, that is Greek for Jim by the way) Show Data view. Actual Results: The first field with Jim shows OK but the other with ΔΗΜΗΤΡΙΟΣ shows jibrish. Mixed English with International character, shows the English ones OK, international jibrish. Expected Results: Field's data source, calculated or not should display international characters correctly. On an irrelevant note. TextBox doesn't allow it's data source to be edited by hand, only permits a choice from the list. Maybe you should change that?
I believe this is related to Kross::action::evaluate() taking a QByteArray, therfore not supporting such characters. Sebsauer, can you advise?
When calling evaluated() it is needed to explicit convert the QString to a QByteArray using myString.toUtf8() (or the other way around using QString::fromUtf8) cause if it's done implicit then latin1 may be used. That's a rather common bug. I would suggest to enable QT_NO_CAST_TO_ASCII and QT_NO_CAST_FROM_ASCII per default and would even go as far and would suggest to enable it for all of KDE per default (see also http://www.mail-archive.com/kde-buildsystem@kde.org/msg06033.html ). So, either add #define QT_NO_CAST_TO_ASCII #define QT_NO_CAST_FROM_ASCII to the code or something like (untested); add_definitions(QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII) to your cmake-file to figure out which places in reports may have problems with that.
Git commit 8694fc63ae51f2f6f89514d5816187d8907cf2a5 by Jaroslaw Staniek. Committed on 12/03/2012 at 23:28. Pushed by staniek into branch 'master'. Fixed displaying international characters in calculated values Reports *Fixed bug: setting a field's data source to a calculated value, results international characters not displaying correctly M +4 -0 kexi/doc/dev/CHANGELOG-Kexi-js M +6 -1 kexi/plugins/reports/krscriptfunctions.cpp M +5 -3 libs/koreport/renderer/scripting/krscripthandler.cpp http://commits.kde.org/calligra/8694fc63ae51f2f6f89514d5816187d8907cf2a5
Git commit 2bfb09220e0e61fbc03aa3606d53e21f14bd8374 by Jaroslaw Staniek. Committed on 12/03/2012 at 23:28. Pushed by staniek into branch 'calligra/2.4'. Fixed displaying international characters in calculated values Reports *Fixed bug: setting a field's data source to a calculated value, results international characters not displaying correctly M +5 -0 kexi/doc/dev/CHANGELOG-Kexi-js M +6 -1 kexi/plugins/reports/krscriptfunctions.cpp M +5 -3 libs/koreport/renderer/scripting/krscripthandler.cpp http://commits.kde.org/calligra/2bfb09220e0e61fbc03aa3606d53e21f14bd8374