Shading language version conversion to double fail

Bug #1797792 reported by Jukka Pakarinen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Critical
Unassigned

Bug Description

Widelands does not work with finnish language option but 'en_US' works fine.

./widelands --language=fi_FI

Last two lines from console:

Graphics: OpenGL: ShadingLanguage: "1.30" (1,00)
ERROR: Shading language version is too old!

I think that atof conversion depends on locale. Decimal separator is comma character in finnish which might be the problem. My first guess, but not absolutely sure about that.

I compiled Widelands from trunk, revno 8883, on Debian 9.5.

Related branches

Revision history for this message
Notabilis (notabilis27) wrote :

Thanks for the bug report.
We also got a related bug report on the forum for french locales:
https://wl.widelands.org/forum/topic/4237/?page=2#post-26398

atof() seems indeed to be the problem, I guess we have to replace it with something locale-independent.

Changed in widelands:
importance: Undecided → Critical
status: New → Confirmed
milestone: none → build20-rc1
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for confirming that the locale is the problem! I'll set my system locale to an affected language for testing now.

Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
tags: added: internationalization
GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
Revision history for this message
Jukka Pakarinen (flegu) wrote :

I tested revno 8890 and Widelands worked with the finnish language option. Thanks for fixing it!

Revision history for this message
Jukka Pakarinen (flegu) wrote :

I just noticed that this one was only a hotfix and the real fix is comming later.

Revision history for this message
Notabilis (notabilis27) wrote :

The real fix has been merged to trunk now. Can you test whether it works for you, please?

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
Jukka Pakarinen (flegu) wrote :

The real fix works as expected. Thanks!

Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.