But when saving it as html, both IE and Firefox shows these characters wrong.
After some trial and error, I found that adding the following line into the html file
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
the text is both shown well in both IE and Firefox.
As I do don't understand much of encoding and htlm,
I wonder if this is the correct way ?
yes, it is -- you need to specify the encoding to get things to render right. Browsers do often try to guess the correct encoding if there is not one specified, but I guess they didn't succeed in this case.
And if so, why isn't that implemented in RichTextCtrl ?
good question -- when working with unicode (or anything really!), you absolutely need to specify the encoding -- writing html without an encoding is a bug.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
It probably should be. Open a ticket about it at wxTrac.
···
On 1/29/10 3:24 PM, Stef Mientki wrote:
After some trial and error, I found that adding the following line into
the html file
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
And if so, why isn't that implemented in RichTextCtrl ?
Done,
I thought wxPython was case sensitive:
first I got this message, which I didn't understand at first
"field component must be set"
should be
"field Component must be set"
Then RichTextCtrl is not in the list,
so isn't that an official Component ?
cheers,
Stef
···
On 01-02-2010 19:35, Robin Dunn wrote:
On 1/29/10 3:24 PM, Stef Mientki wrote:
After some trial and error, I found that adding the following line into
the html file
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
And if so, why isn't that implemented in RichTextCtrl ?
It probably should be. Open a ticket about it at wxTrac.
I thought wxPython was case sensitive:
first I got this message, which I didn't understand at first
"field component must be set"
should be
"field Component must be set"
It says the field should be set, not the field whose label is on your screen as "Component"
Then RichTextCtrl is not in the list,
so isn't that an official Component ?
It's there in the component list as "wxRichText". It's a C++ class so it doesn't have the leading "wx" stripped off like the Python version of the classes do.