[mythtv-users] Non-ASCII characters in mythmessage/mythutil

peper03 at yahoo.com peper03 at yahoo.com
Thu May 24 10:21:10 UTC 2012


> From: Michael T. Dean <mtdean at thirdcontact.com>
> Subject: Re: [mythtv-users] Non-ASCII characters in mythmessage/mythutil
> To: "Discussion about MythTV" <mythtv-users at mythtv.org>
> Date: Wednesday, May 23, 2012, 12:37 AM
> On 05/22/2012 05:49 PM, peper03
> wrote:
> > Hi,
> >
> > Is there any way to display a message containing
> non-ASCII characters using mythutil --message?  I'm
> passing in a UTF-8 encoded string but it doesn't appear to
> be parsed as UTF-8.  Instead the extended characters
> appear as two characters (so processed using a single-byte
> character set).
> >
> > For example:
> >
> > ö appears as ö
> > é appears as é
> >
> > I've tried changing the LANG environment variable but
> it doesn't seem to make any difference.
> 
> Did you try specifying LC_ALL, too?

Yes, I've tried that but it doesn't seem to make any difference.
The only way I've managed to get it to work so far has been by setting the terminal encoding to iso-8859-1 (I've been testing it in Konsole) but I think that's only because the characters I've tried so far are in that character set so everything is single-byte.

LANG is set to en_US.UTF-8:

$ mythutil --message --message_text áéíóúäöü --bcastaddr 127.0.0.1
2012-05-24 12:09:16.783746 C  mythutil version: fixes/0.25 [v0.25-100-gb5b4c48] www.mythtv.org
2012-05-24 12:09:16.783758 C  Qt version: compile: 4.7.4, runtime: 4.7.4
2012-05-24 12:09:16.783760 N  Enabled verbose msgs:  general
2012-05-24 12:09:16.783771 N  Setting Log Level to LOG_INFO
2012-05-24 12:09:16.783801 I  Added logging to the console
2012-05-24 12:09:16.783805 I  Added database logging to table logging
2012-05-24 12:09:16.783848 N  Setting up SIGHUP handler
2012-05-24 12:09:16.783911 N  Using runtime prefix = /usr
2012-05-24 12:09:16.783920 N  Using configuration directory = /home/richard/.mythtv
2012-05-24 12:09:16.783996 I  Assumed character encoding: en_US.UTF-8
name: message_text -- value: áéíóúäöü
output:
<mythmessage version="1">
  <text>áéíóúäöü</text>
  <timeout>%timeout%</timeout>
</mythmessage>
Sent UDP/XML packet to IP 127.0.0.1 and port: 6948
2012-05-24 12:09:16.784306 N  Empty LocalHostName.

The characters shown in then <text> tags are what are then shown in MythFrontend so something, somewhere is not matched up.  I would *guess* that mythutil is not handling UTF-8 correctly as it is showing characters for each of the UTF-8 bytes but I'm equally happy to find it's some configuration problem on my side :)

Richard.



More information about the mythtv-users mailing list