[mythtv] [mythtv-commits] Ticket #4381: Using a Miscellaneous Status Information (see ticket #4049) makes mythbackend segfault occasionnally...
Nicolas Riendeau
knightr at istop.com
Sat Jan 26 14:42:23 UTC 2008
Hi!
Michael T. Dean wrote:
> On 01/19/2008 04:21 PM, Nicolas Riendeau wrote:
>
>>BTW, the small problem I mentionned in the ticket is that the output of "sensors" is
>>localized (at least the one bundled with FC8) so when the locale is different from
>>en_US.US-ASCII, what gets extracted by awk (in the myth_sensors.sh script) is not
>>exactly what we would want it to be.
>>
>>[For example, with a LANG=en_US.UTF-8 or LANG=en_US.ISO-8859-1,
>
>
> Hmmm. My system uses en_US.iso88591 . I think the above might be a bad
> charset name (and setting that value on my system also breaks it).
> Regardless, since it didn't work with your system's default localization
> (which I'm assuming is different), we need to fix it.
It's difficult to say because for it looks like for many distribution setting
LANG=en_US.ISO-8859-1 is legit...
I tried setting LANG=en_US.iso88591 and I got the same output as
LANG=en_US.ISO-8859-1. (BTW, if I try a non-existant locale I get the same output as
US-ASCII so both locales are "recognized").
What I get as output in both situations (I kept only the relevant part) is
Sys Temp: +47°C (high = +95°C, hyst = +60°C) [thermistor]
CPU Temp: +48.5°C (high = +95.0°C, hyst = +45.0°C) [CPU diode ]
So what removed the space that was present in US-ASCII is the "degree" symbol.
re: in US-ASCII I get
Sys Temp: +47 C (high = +95 C, hyst = +60 C) [thermistor]
CPU Temp: +48.5 C (high = +95.0 C, hyst = +45.0 C) [CPU diode ]
in UTF-8 (but seen through a CP1252/ISO-8859-1 SSH terminal) I see
Sys Temp: +48°C (high = +95°C, hyst = +60°C) [thermistor]
CPU Temp: +47.5°C (high = +95.0°C, hyst = +45.0°C) [CPU diode ]
which is to be expected since in UTF-8 the degree sign is 0xC2 + 0xB0 which in
ISO-8859-1 is an  (0xC2) followed by an ° (0xB0).
> Well, I don't think I can go to far with the "simple gawk script"
> approach I tried to use, so I wrote a little Perl script, instead. Does
> the attached work for you without any LANG= workaround? It has a much
> better regex and is also more capable, so if it works, I'll write it up
> into a proper myth_sensors.pl and submit the change to Trac.
Yes, I can confirm that it does work regardless of locale (at least with the ones I
tried)..
>
> Also, what locale is your system configured to use?
LANG=en_US.ISO-8859-1. It was originally set to LANG=en_US.UTF-8 when I originally
installed that pc (ie that was the setting I ended up with after install). BTW, I am
running FC8 (or is it F8 now?) but that pc install was done in FC7 (I upgraded it in
place using one of the FC7 -> FC8 upgrade procedures).
> And, if the
> attached doesn't work, can you send the output of your sensors program
> to me (as an attached file), please.
Since it does work that will not be needed I guess (and I already put, before reading
that part of your email the relevant excerpts out of the output anyway... (-; ).
>
> Thanks for testing,
> Mike
No problem...
BTW, I noticed that you posted a new patch on the ticket...
I'll get the latest SVN and apply it to it in a few minutes... Does it need new perl
programs or can it work with the current ones?
Have a nice day!
Nick
More information about the mythtv-dev
mailing list