[Gtk-sharp-list] app runs on windows, not on linux

Rafael Teixeira monoman at gmail.com
Sun May 21 18:03:55 EDT 2006


Hi Travis,

Sorry for being late to answer, got lost in other threads and tasks.

I don't know of encoding detectors as it is something very hard to
achieve, as there is superpositioning of symbols and you would need to
have some semantic level processing to find out the right encoding.

I think the best way to find it out, is to trace the origins. In what
editor were your xml files created?

In VS.NET, for example utf-8 is used by default for .xml files, so you
maybe did choose another unsupported extension (it must be .xml or
some few others) for your files.

If some other non-xml-specific editor was used, or some unsupported
extension was used in VS.NET, probably your files are using either one
of the Windows specific encodings (usually Win1252, see
http://www.cs.tut.fi/~jkorpela/chars.html#win ), or worse in some DOS
code page.

See http://www.intertwingly.net/stories/2004/04/14/i18n.html for some
graphical evidence.

In your shoes I would create new .xmls files in VS.NET, or some good
xml-specific editor, in plain UTF-8, and try to copy and paste your
old files content it, to replace the old files. Test everything with
the new files and then zip them back.

Also, beware of non-ascii (char code >= 128) characters in FILE AND
DIRECTORY NAMES as they add another hurdle in the way to
interoperability, as file compression/decompression may mangle them,
making files unusable as decompressed.

Hope some of it helps

:)

On 5/16/06, Travis Staloch <twostepted at yahoo.com> wrote:
> Rafael,
>
> Thanks for your assistance.  I don't believe that I've
> adjusted the encoding of any of my app's xml documents
> including the .glade file from utf-8.  The files were
> zipped up from windows onto a usb disc and then copied
> directly over to my FC5 box.
>
> Do you know of a good way to detect document endoding?
>  If I could tell how it was encoded, I could then
> adjust the processing directive(s) if necessary.  Do
> you agree?
>
> Thanks, Regards,
>
> --Travis
>
> --- Rafael Teixeira <monoman at gmail.com> wrote:
>
> > Hi Travis,
> >
> > Generally UTF-8 is the best choice as the encoding
> > for xml, including
> > Glade, files.
> >
> > But beware of any post-processing that may be
> > occurring, like
> > translation extraction/substitution or resource
> > embedding. They must
> > be redone after changing the encoding of the glade
> > files. Take care
> > the while xml parsers normally can accept well many
> > encodings (if
> > correctly instructed in the processing directive),
> > some of those
> > post-processing tools may not understand that and
> > may have to be
> > manually instructed.
> >
> > Good luck,
> >
> > On 5/15/06, Travis Staloch <twostepted at yahoo.com>
> > wrote:
> > > Hello,
> > >
> > > I've been writing to mono-list at ximian.com about
> > this
> > > without any conclusive info thus far.  Please
> > forgive
> > > me it this is a cross-post as I've written pretty
> > much
> > > the same things there.
> > >
> > > I wrote a (hopefully) cross-platform scipted
> > installer
> > > application using glade on my windows box.  The
> > app
> > > runs fine on that platform.  It was build with the
> > csc
> > > compiler using visual studio 2003 and then all the
> > > files were copied over to my FC5 box.  I did the
> > same
> > > with another non-gui app and had no problems.
> > >
> > > Here is the error message that I get:
> > >
> > ****************************************************
> > > Gtk-WARNING **: Failed to set label from markup
> > due to
> > > error parsing markup: Error on line 4 char 6: '0'
> > is
> > > not a valid character following a '<' character;
> > it
> > > may not begin an element name
> > >
> > ****************************************************
> > >
> > > It sounds to me like I'm passing some bad markup
> > to
> > > one of the glade labels.  I've validated my .glade
> > > project file and also my app's xml config file
> > which
> > > contains some of the labels' text.
> > >
> > > I thought that this might be an encoding problem
> > where
> > > my xml file was saved with a funny encoding.  I
> > tried
> > > to resave the xml files.  I also thought that
> > somehow
> > > I'm getting bad characters passed to one of the
> > glade
> > > labels.  I'm doing some search & replace in the
> > config
> > > file, replacing a few variables which can appear
> > in
> > > the xml content.
> > >
> > > Does any of this ring a bell with anyone?
> > >
> > > Regards, Thanks,
> > >
> > > --Travis
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > > _______________________________________________
> > > Gtk-sharp-list maillist  -
> > Gtk-sharp-list at lists.ximian.com
> > >
> >
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> > >
> >
> >
> > --
> > Rafael "Monoman" Teixeira
> > ---------------------------------------
> > As I'm currently working a lot with Java and even
> > fixing Java VMs
> > (JamVM/Kaffe) and GNU Classpath code, I think I may
> > partly borrow the
> > title (Javaman) from my friend Bruno Souza and
> > become the
> > MonoNJavaMan. Yeah, I may currently be crazier than
> > usual...
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
As I'm currently working a lot with Java and even fixing Java VMs
(JamVM/Kaffe) and GNU Classpath code, I think I may partly borrow the
title (Javaman) from my friend Bruno Souza and become the
MonoNJavaMan. Yeah, I may currently be crazier than usual...


More information about the Gtk-sharp-list mailing list