xlog-discussion
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xlog-discussion] xlog-0.9.1.1.deb and hamlib2 packages


From: Stephane Fillod
Subject: [Xlog-discussion] xlog-0.9.1.1.deb and hamlib2 packages
Date: Sun, 7 Mar 2004 21:17:56 +0100
User-agent: Mutt/1.5.5.1+cvs20040105i

Hi Joop,

I've Cc'd this message to the xlog list, so maybe it can help others.

On Wed, Mar 03, 2004, Joop Stakenborg wrote:
> > I've just run into a problem with xlog-0.9.1.1 .deb that has a taste
> > of deja-vu, but I can't remember the answer.
[...]
> > This is with loading log files that contains local chars (french
> > chars of extended ASCII) that are not UTF8 in the file.
> >
> > Here are the error messages:
> >
> > <<
> > [Invalid UTF-8] Unable to convert '02 aoû 2003' to UTF-8: Invalid byte
> > sequence in conversion input[Invalid UTF-8]Unable to convert '07 déc
> > 2001' to UTF-8: Invalid byte sequence in conversion input.....
> > (xlog:10707): GLib-WARNING **: GError set over the top of a previous
> > GError or uninitialized memory.
> > This indicates a bug in someone's code. You must ensure an error is NULL
> > before it's set.
> > The overwriting error message was: Invalid byte sequence in conversion
> > input
> > [Invalid UTF-8] Unable to convert 'Alberto, 75W 9elts, à coté de
> > Noirmoutier' to UTF-8: Segmentation fault
> What you are trying to do is dangerous. There are foreign language
> characters in your log. The warning you are seeing: "Invalid byte sequence
> in conversion input" means xlog can't convert to on-screen characters. So
> when reading a log with foreign characters with improper language settings
>  might cause information loss. You must stick to your language and please
> don't switch between languages, or you might be in trouble and lose part
> of your log.
> 
> I have fixed the crash in the version that is on my harddisk. I should
> have done a "GError = NULL" before every utf8 conversion.
> 
> The way I am handling utf8 now is better. I try to convert from locale to
> utf8 with a fallback included. If this fails I pop-up a dialog advising
> the user to run from a console, so he can see the UTF-8 errors.

> The correct line is: "LANG=fr_FR; xlog".

Actually, the correct setting for my LANG variable should be
"address@hidden". IOW, this should be a value supported in the file
/etc/locale.gen.

> > Could it be possible to convert non UTF-8 chars to UTF-8?

Found it (change "t-francais" to your local charset):

        $ for f in *.xlog ; do recode t-francais..UTF-8 $f ; done

NB: there might be a logfile handling hazard with UTF-8 because the
xlog 'logfile' library is not aware of multibyte characters (most
formats have fixed length oriented fields).


Cheers,
-- 
Stephane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]