Hi there.
Im using wx.html to display an html page in UTF-8.
Under linux it works as is. Under windows i have to use
html.decode('UTF-8') and set a meta tag (<meta http-equiv="Content-
Type" content="text/html; charset=UTF-8" />)
With these changes all seems to work fine but im getting a really
annoying message.
Failed to display HTML document in UTF-8 encoding
Anyone who knows how to fix that?
Please create a sample app; MakingSampleApps - wxPyWiki
···
On 8 October 2010 12:27, picon <pasxal.antix@gmail.com> wrote:
Hi there.
Im using wx.html to display an html page in UTF-8.
Under linux it works as is. Under windows i have to use
html.decode('UTF-8') and set a meta tag (<meta http-equiv="Content-
Type" content="text/html; charset=UTF-8" />)
With these changes all seems to work fine but im getting a really
annoying message.
Failed to display HTML document in UTF-8 encoding
Anyone who knows how to fix that?
Found to ways to solve this.
-
page = page.decode(‘utf-8’).encode(‘iso-8859-7’)
-
import BeautifulSoup and do page = BeautifulSoup(page).str(“ISO-8859-7”)
···
2010/10/8 Kechagias Apostolos pasxal.antix@gmail.com
Here it is.
2010/10/8 Steven Sproat sproaty@gmail.com
On 8 October 2010 12:27, picon pasxal.antix@gmail.com wrote:
Hi there.
Im using wx.html to display an html page in UTF-8.
Under linux it works as is. Under windows i have to use
html.decode(‘UTF-8’) and set a meta tag (<meta http-equiv="Content-
Type" content=“text/html; charset=UTF-8” />)
With these changes all seems to work fine but im getting a really
annoying message.
Failed to display HTML document in UTF-8 encoding
Anyone who knows how to fix that?
Please create a sample app; http://wiki.wxpython.org/MakingSampleApps
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
hi,
your original example works fine on Linux. See attached screenshot.
Linux dm-steven 2.6.31-22-generic #65-Ubuntu SMP Thu Sep 16 16:21:34
UTC 2010 x86_64 GNU/Linux
python 2.6; wx 2.8.10.1
···
On 8 October 2010 14:31, Kechagias Apostolos <pasxal.antix@gmail.com> wrote:
Found to ways to solve this.
1) page = page.decode('utf-8').encode('iso-8859-7')
2) import BeautifulSoup and do page =
BeautifulSoup(page).__str__("ISO-8859-7")
2010/10/8 Kechagias Apostolos <pasxal.antix@gmail.com>
Here it is.
2010/10/8 Steven Sproat <sproaty@gmail.com>
On 8 October 2010 12:27, picon <pasxal.antix@gmail.com> wrote:
> Hi there.
>
> Im using wx.html to display an html page in UTF-8.
> Under linux it works as is. Under windows i have to use
> html.decode('UTF-8') and set a meta tag (<meta http-equiv="Content-
> Type" content="text/html; charset=UTF-8" />)
> With these changes all seems to work fine but im getting a really
> annoying message.
>
> Failed to display HTML document in UTF-8 encoding
>
> Anyone who knows how to fix that?
Please create a sample app; MakingSampleApps - wxPyWiki
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
also, are you using the unicode version of wx?
···
On 8 October 2010 14:35, Steven Sproat <sproaty@gmail.com> wrote:
On 8 October 2010 14:31, Kechagias Apostolos <pasxal.antix@gmail.com> wrote:
Found to ways to solve this.
1) page = page.decode('utf-8').encode('iso-8859-7')
2) import BeautifulSoup and do page =
BeautifulSoup(page).__str__("ISO-8859-7")
2010/10/8 Kechagias Apostolos <pasxal.antix@gmail.com>
Here it is.
2010/10/8 Steven Sproat <sproaty@gmail.com>
On 8 October 2010 12:27, picon <pasxal.antix@gmail.com> wrote:
> Hi there.
>
> Im using wx.html to display an html page in UTF-8.
> Under linux it works as is. Under windows i have to use
> html.decode('UTF-8') and set a meta tag (<meta http-equiv="Content-
> Type" content="text/html; charset=UTF-8" />)
> With these changes all seems to work fine but im getting a really
> annoying message.
>
> Failed to display HTML document in UTF-8 encoding
>
> Anyone who knows how to fix that?
Please create a sample app; MakingSampleApps - wxPyWiki
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
hi,
your original example works fine on Linux. See attached screenshot.
Linux dm-steven 2.6.31-22-generic #65-Ubuntu SMP Thu Sep 16 16:21:34
UTC 2010 x86_64 GNU/Linux
python 2.6; wx 2.8.10.1
Im using ansi version. Big mistake.
···
2010/10/8 Steven Sproat sproaty@gmail.com
On 8 October 2010 14:35, Steven Sproat sproaty@gmail.com wrote:
On 8 October 2010 14:31, Kechagias Apostolos pasxal.antix@gmail.com wrote:
Found to ways to solve this.
- page = page.decode(‘utf-8’).encode(‘iso-8859-7’)
- import BeautifulSoup and do page =
BeautifulSoup(page).str(“ISO-8859-7”)
2010/10/8 Kechagias Apostolos pasxal.antix@gmail.com
Here it is.
2010/10/8 Steven Sproat sproaty@gmail.com
On 8 October 2010 12:27, picon pasxal.antix@gmail.com wrote:
Hi there.
Im using wx.html to display an html page in UTF-8.
Under linux it works as is. Under windows i have to use
html.decode(‘UTF-8’) and set a meta tag (<meta http-equiv="Content-
Type" content=“text/html; charset=UTF-8” />)
With these changes all seems to work fine but im getting a really
annoying message.
Failed to display HTML document in UTF-8 encoding
Anyone who knows how to fix that?
Please create a sample app; http://wiki.wxpython.org/MakingSampleApps
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
hi,
your original example works fine on Linux. See attached screenshot.
Linux dm-steven 2.6.31-22-generic #65-Ubuntu SMP Thu Sep 16 16:21:34
UTC 2010 x86_64 GNU/Linux
python 2.6; wx 2.8.10.1
also, are you using the unicode version of wx?
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en