View Single Post
Old 03-26-2010, 11:58 AM   #52
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by tomm View Post
Hi all,

first of all many thanks to Iņigo for the excellent work.

I have gotten further why the 'sysinfo' application crashes:
If I start an interactive lua session and type "print(tonumber('3.14'))" I get exactly what I expect. However, if I put such a line into "sysinfo.lua", I get 'nil' as a result.

This looks like a locale issue (note that I have set my language to german, which might imply a 'comma' as 'decimal point' for the tonumber function).

What will be the best way to set the locale temporarily for the sysinfo application? Why does the xterm application seems to export 'english' settings?

Many thanks again
Tomm
whoahhhh!!!! very good catch!
I don't know lua in depth and hadn't noticed this behaviour.

The solution is easy: a simple os.setlocale('C', 'numeric') at the start of the program will solve the bug.

I bought a DR800S a couple of weeks ago, so I won't develop more for the Iliad, sorry.
Iņigo is offline   Reply With Quote