[wxPython] non-english HTML

How can one display non-english HTML-text, especially it has some
&#nnnn; in it made by an html-editor. It seems that a lot of
such enteties are not supported in wxWindows,
for example a russian html-text is in the help controller not
displayabel.
German Ü and so on works.

Udo

Hi,

Udo Floegel wrote:

How can one display non-english HTML-text, especially it has some
&#nnnn; in it made by an html-editor. It seems that a lot of
such enteties are not supported in wxWindows,

*All* entities are supported in 2.3.2b6. You don't mention what
version of wxWin you use. 2.2.x used to have very limited support for
entities, but 2.3.1 should be ok.

It may not be possible to _display_ some of the entities, it depends
on the encoding you use (as well as your OS).

Regards,
Vaclav

Vaclav Slavik wrote:

*All* entities are supported in 2.3.2b6. You don't mention what
version of wxWin you use. 2.2.x used to have very limited support for
entities, but 2.3.1 should be ok.

Great, it is so. It's worth of a remark in changes.txt.

So to the russian. A html-text written with MSWord 9 prints
for the small russian l (like greek lambda) л and with is with
newer browsers correct to see.

Regards, Udo

Hi,

Great, it is so. It's worth of a remark in changes.txt.

<quote file="changes.txt">
wxHTML:

- new HTML parser with correct parsing of character entities and fixes
  to tags parsing
- added support for animated GIFs
</quote>
:slight_smile:

So to the russian. A html-text written with MSWord 9 prints
for the small russian l (like greek lambda) &#1083; and with is
with newer browsers correct to see.

I don't understand. Are you trying to say it isn't displayed
correctly in 2.3.2b6? If an entity/character isn't in the charset
you use, you'll get '?' instead.

Since wxPython uses non-Unicode build of wxWindows, you have two
choices how to make it work: either don't include <meta http-equiv>
tag in your file and make sure systems default charset contains
#1083, or add the meta tag above to your HTML file, with proper
charset specified.

Regards,
Vaclav

Vaclav Slavik wrote:

Since wxPython uses non-Unicode build of wxWindows, you have two
choices how to make it work: either don't include <meta http-equiv>
tag in your file and make sure systems default charset contains
#1083, or add the meta tag above to your HTML file, with proper
charset specified.

&#1083; is correct to see with:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
but then most enteties are wrong, surely because they aren't in this charset.

Since wxPython uses non-Unicode build of wxWindows

What would happen if wxPython would base on the Unicode-build?
Than I could have greek letters in all the (non-)english text.

Thanks, Udo

> Since wxPython uses non-Unicode build of wxWindows

What would happen if wxPython would base on the Unicode-build?

You could display all characters (present in the font) at once. The
trouble is, GTK+ doesn't support Unicode yet, so wxPython cannot use
it, either. But this will change with GTK+ 1.4

bye,
Vaclav