Support UTF-8 in all translation strings.

Bug #997104 reported by Daniel Schürmann on 2012-05-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Konarak Ratnakar

Bug Description

QObject::tr can handle only ASCII by default.


I would prefer to escape those characters in string literals, to get around source file encoding issues.

summary: - non ASCII Character is Tooltips "see Preferences→Vinyl Control"
+ non ASCII Character in Tooltips "see Preferences→Vinyl Control"

It seems we can do QTextCodec::setCodecForTr("UTF-8") to switch tr() to be interpreted as UTF-8.

Changed in mixxx:
milestone: none → 1.11.0
assignee: nobody → RJ Ryan (rryan)
importance: Undecided → Low
status: New → Confirmed
RJ Skerry-Ryan (rryan) wrote :

Looks like jus fixed this by switching away from the → character. We may want to address this in the future, so renaming and removing from 1.11.0

Changed in mixxx:
milestone: 1.11.0 → none
assignee: RJ Ryan (rryan) → nobody
summary: - non ASCII Character in Tooltips "see Preferences→Vinyl Control"
+ Support UTF-8 in all translation strings.
tags: added: i18n
RJ Skerry-Ryan (rryan) wrote :

Instead of find-replacing all tr() calls with trUtf8(), I think we should go the setCodecForTr route.

tags: added: easy
Changed in mixxx:
assignee: nobody → Konarak Ratnakar (konarak)
Daniel Schürmann (daschuer) wrote :

Thank you for adopting this one,

Before you do any changes please read:
and check what happens if you checkout on Windows with a Latin-1 char set.
.. and report the result here.

Konarak Ratnakar (konarak) wrote :

I think I have fixed this but when I run tests I get:

ControllerEngine: Loading "./res/controllers/common-controller-scripts.js"
ControllerEngine shutting down...
[1] 8912 segmentation fault (core dumped) ./mixxx-test

Any idea what might be wrong? (I have no controllers attached)

Daniel Schürmann (daschuer) wrote :

have you tried the test without your changes?

You can run the tests inside gdb to find out what happens.
just replace mixxx with mixxx-test.

Konarak Ratnakar (konarak) wrote :

I tried the test without my changes and it gave me same result as I've mentioned.
I also tried tests inside gdb but I'm clueless. Here's the backtrace:

Max Linke (max-linke) wrote :

That is not your fault. The test build does not work currently see Bug #1038234

Changed in mixxx:
status: Confirmed → In Progress
Konarak Ratnakar (konarak) wrote :

Here's the patch. I have verified this using
qDebug() << QTextCodec::codecForTr()->name();

Konarak Ratnakar (konarak) wrote :

I've tested this with non-ascii characters on linux and it's working. I do not have access to a windows machine so I'm not sure about that.

Max Linke (max-linke) wrote :

If you explain how you verified it I can test it on windows over the weekend

Max Linke (max-linke) wrote :

It also works on windows. I commited your patch to trunk

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan) on 2013-05-10
Changed in mixxx:
milestone: none → 1.12.0
RJ Skerry-Ryan (rryan) on 2015-12-30
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers