Problem with Euro sign

What is the default character encoding in your Windows app? ISO-8859-1
does not contain the Euro character. The windows OEM code pages have it
as ordinal 128 (0x80). You can switch to ISO-8859-15, which does include
it, although it is ordinal 164 (0xa4).

How are you creating the Euro symbol? Are you using "€" or are you
just embedding an 8-bit character code?

···

On Wed, 17 May 2006 20:04:46 +0200, Hugues JEAN-BAPTISTE <hjb@agorinfo.fr> wrote:

I have problem with the Euro sign (€) and wx.html.HtmlPrintout.
The Euro sign is previewed correctly under Linux, but is replaced by a
(?) under WinXP.
I use :
Linux : Python 2.3.4 and wxPython2.6-gtk2-ansi-2.6.1.0-mdk101_py2.3
WinXP : Python 2.3.5 and wxPython2.6-win32-ansi-2.6.1.0-py23

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts wrote:

I have problem with the Euro sign (€) and wx.html.HtmlPrintout.
The Euro sign is previewed correctly under Linux, but is replaced by a
(?) under WinXP.
I use :
Linux : Python 2.3.4 and wxPython2.6-gtk2-ansi-2.6.1.0-mdk101_py2.3
WinXP : Python 2.3.5 and wxPython2.6-win32-ansi-2.6.1.0-py23
   
What is the default character encoding in your Windows app? ISO-8859-1
does not contain the Euro character. The windows OEM code pages have it
as ordinal 128 (0x80). You can switch to ISO-8859-15, which does include
it, although it is ordinal 164 (0xa4).

How are you creating the Euro symbol? Are you using "&euro;" or are you
just embedding an 8-bit character code?

Don't know within html, but I use ISO-8859-1 as my encoding both for wxPython/Python and Firebird SQL and I can store and retrieve the Euro sign. I enter it using either Alt-Gr E or Alt-0128.

I don't know why this works, as if I had RTFM or the ISO specs I guess I would have selected another encoding :slight_smile: .

Googling a bit I found this:

and this:

Which probably explains why it works for me.

See you
Werner

···

On Wed, 17 May 2006 20:04:46 +0200, Hugues JEAN-BAPTISTE ><hjb@agorinfo.fr> wrote:

Werner F. Bruhin a écrit :

Tim Roberts wrote:

I have problem with the Euro sign (€) and wx.html.HtmlPrintout.
The Euro sign is previewed correctly under Linux, but is replaced by a
(?) under WinXP.
I use :
Linux : Python 2.3.4 and wxPython2.6-gtk2-ansi-2.6.1.0-mdk101_py2.3
WinXP : Python 2.3.5 and wxPython2.6-win32-ansi-2.6.1.0-py23

What is the default character encoding in your Windows app? ISO-8859-1
does not contain the Euro character. The windows OEM code pages have it
as ordinal 128 (0x80). You can switch to ISO-8859-15, which does include
it, although it is ordinal 164 (0xa4).

How are you creating the Euro symbol? Are you using "&euro;" or are you
just embedding an 8-bit character code?

Don't know within html, but I use ISO-8859-1 as my encoding both for wxPython/Python and Firebird SQL and I can store and retrieve the Euro sign. I enter it using either Alt-Gr E or Alt-0128.

I don't know why this works, as if I had RTFM or the ISO specs I guess I would have selected another encoding :slight_smile: .

Googling a bit I found this:
Codage valide des caractères Windows illégaux en HTML et XHTML | Openweb.eu.org

and this:
Windows-1252 — Wikipédia

Which probably explains why it works for me.

See you
Werner

1) Thanks for your reply and links Tim and Werner

2) I have tested with :

    * "#-*- coding: iso-8859-15 -*-" in the python program
    * <head> <meta content="text/html; charset=ISO-8859-15" ... in the
      html source

3) I have tested also with "&euro" and directly the char. "€"

4) The Euro sign is not a problem in my programs (wx.TextCtrl) to store and retrieve it in the databases I use (MySQL and SQLite)

It's just a problem with wx.html.HtmlPrintout under WinXP !...
But, the most part of my customers works under MSWindows :frowning: .
I prefer Linux :wink: .

Friendly.

···

On Wed, 17 May 2006 20:04:46 +0200, Hugues JEAN-BAPTISTE >> <hjb@agorinfo.fr> wrote:

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)