EURO sign

Otto Müller
Tue, 03 Sep 2002 18:53:36 +0200

Christian Stimming wrote:
 > On Freitag, 30. August 2002 08:41, Otto Müller wrote:
 >>In HTML you can use the meta-character €
 >>When I change the Ascii 164 (or its equivalent ¤) to € in
 >>the html-source afterwards, it looks all fine and prints the same.
 > This is the most excellent hint concerning the Euro symbol that has
 > ever been voiced on gnucash-user. I just implemented it in both
 > unstable and stable, and now the Euro symbol is correctly displayed in
 > all textual (html) reports.
 > Thanks a lot, Otto.
 > In case you don't use CVS but want to have that bugfix *now*, just
 > apply the attached patch to the file html-style-info.scm, to be found
 > in $prefix/share/gnucash/scm.
 > Cheers,
 > Christian
 > Index: html-style-info.scm
 > ===================================================================
 > RCS file:
 > /home/cvs/cvsroot/gnucash/src/report/report-system/html-style-info.scm,v
 > retrieving revision 1.3
 > retrieving revision 1.4
 > diff -r1.3 -r1.4
 > 287,289c287,295
 > <   (gnc:amount->string
 > <    (gnc:gnc-monetary-amount datum)
 > <    (gnc:commodity-print-info (gnc:gnc-monetary-commodity datum) #t)))
 > - ---
 >>  (let* ((result (gnc:amount->string-helper
 >>                (gnc:gnc-monetary-amount datum)
 >>                (gnc:commodity-print-info
 >>                 (gnc:gnc-monetary-commodity datum) #t)))
 >>       (ind (string-index result (integer->char 164))))
 >>    (if ind
 >>      (string-append (substring result 0 ind) "&euro;"
 >>                     (substring result (+ 1 ind) (string-length result)))
 >>      result)))

I applied this patch and played around with the exported report and the
OpenOffice Writer.

Without the patch, the euro symbol is the character "&#164;", with the
patch applied it is the character "&#8364;". The latter is displayed (in 
gnucash as well as in my browser) as the correct glyph.

When loading the reports into the OpenOffice Writer and saving them, I
find a conversion (done by OpenOffice Writer): The "&#164;" becomes the
metacharacter "&curren;" and the "&#8364;" becomes the metacharacter

First I wonder about the &#8364; from gnucash as a look at the patch
suggests to find a &euro;.

Next: Isn't the choice of OpenOffice the best, letting the task to
display the right glyph to the browser?
There is &curren; for the universal currency symbol, for various
presentations of the euro in HTML look at