Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003534Doomseeker[All Projects] Bugpublic2018-10-06 09:232018-10-13 16:54
ReporterWubTheCaptain 
Assigned ToZalewa 
PrioritynormalSeveritytrivialReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.2 
Target Version1.2Fixed in Version1.2 
Summary0003534: Qt4's assumption of Latin-1 encoding decodes UTF-8 characters in Doomseeker built with Qt4 incorrectly (language configuration)
Description"Español" gets garbled into "Espanñol" (or similar) in configuration, because of UTF-8 characters not being expected in Doomseeker built with Qt4. Support for UTF-8 characters would need to be explicitly added in Qt4.

See attached screenshot.
Steps To ReproduceGrab a "recent" source of Doomseeker 1.2~beta from Mercurial tip (where development happens), with Spanish translation built-in.

To build Doomseeker with Qt4, do:

cmake -DFORCE_QT4=YES $DOOMSEEKER_SRC
make -j$(nproc) # or just make -j4 for example, there's no nproc(1) on OpenBSD


where $DOOMSEEKER_SRC is the location of source code.

Launch Doomseeker and navigate to:

  1. Options
  2. Configure (F5)
  3. Appearance
Additional InformationNot reproducible in Qt5, because Qt5 expects UTF-8 and UTF-8 only.

'https://wiki.qt.io/index.php?title=Strings_and_encodings_in_Qt&oldid=23630 [^]'
Attached Filespng file icon 2018-10-06-091643_534x118_scrot.png [^] (13,922 bytes) 2018-10-06 09:23

- Relationships
related to 0003503closedZalewa Qt4's assumption of Latin-1 encoding decodes UTF-8 characters in Doomseeker built with Qt4 incorrectly (about dialog) 
child of 0003486closedPol M Translate Doomseeker to Spanish 

-  Notes
User avatar (0019961)
Zalewa (developer)
2018-10-06 18:48
edited on: 2018-10-06 18:49

QString contains a constructor that allows to implicitly convert to its type a QByteArray, which in this case is provided from QIODevice::readLine(). The reason why this "works" "properly" in Qt5 and doesn't in Qt4 becomes apparent when you compare the documentation for this constructor for both versions of Qt and notice that in Qt4 it uses "fromAscii()" to convert to string type and in Qt5 it uses "fromUtf8()".

An explicit call to QString::fromUtf8() should fix the problem:'https://bitbucket.org/Doomseeker/doomseeker/commits/657feabd0feb968f3ac330ac9009921c8dab3608 [^]'

User avatar (0019962)
WubTheCaptain (reporter)
2018-10-06 19:02

Zalewa's patch works with both Debian GNU/Linux and OpenBSD built with Qt4.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: WubTheCaptain

- Issue History
Date Modified Username Field Change
2018-10-06 09:23 WubTheCaptain New Issue
2018-10-06 09:23 WubTheCaptain Status new => assigned
2018-10-06 09:23 WubTheCaptain Assigned To => Zalewa
2018-10-06 09:23 WubTheCaptain File Added: 2018-10-06-091643_534x118_scrot.png
2018-10-06 09:24 WubTheCaptain Relationship added related to 0003503
2018-10-06 09:25 WubTheCaptain Description Updated View Revisions
2018-10-06 09:25 WubTheCaptain Additional Information Updated View Revisions
2018-10-06 09:27 WubTheCaptain Relationship added child of 0003486
2018-10-06 18:48 Zalewa Note Added: 0019961
2018-10-06 18:48 Zalewa Status assigned => needs testing
2018-10-06 18:49 Zalewa Note Edited: 0019961 View Revisions
2018-10-06 19:02 WubTheCaptain Note Added: 0019962
2018-10-06 19:02 WubTheCaptain Status needs testing => resolved
2018-10-06 19:02 WubTheCaptain Fixed in Version => 1.2
2018-10-06 19:02 WubTheCaptain Resolution open => fixed
2018-10-13 16:54 WubTheCaptain Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker