EURO sign

Christian Stimming stimming@tuhh.de
Sun, 1 Sep 2002 15:07:29 +0200


-----BEGIN PGP SIGNED MESSAGE-----

(Gnucash in the Bundestag? Cool :-)

On Freitag, 30. August 2002 08:41, Otto Müller wrote:
> Christian Stimming wrote:
> > Christian Pöllmann wrote:
> > > i have configured EURO as my currency. However, all reports do not
> > > display the EURO sign but a different strange special character.
> > > How do I teach GnuCash to display ASCI character 164 as the EURO sign?
> >
> > Short answer: You can't. Euro signs in the HTML reports are not
> > possible until gnucash is ported to Gnome2, which nobody has started
> > so far and won't be the case until way next year.
>
> 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)))
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iQCVAwUBPXIRH2XAi+BfhivFAQGeigP/UC5NZU+XHRwcAFSsl9YePRCL5hjOfsgR
4FusU0YpdSHq2QYSr5glmTJ7wcIc/WPm/RRbx2bb6cCvViHaSqaHU5YbSwmUadJX
xDixW3+55sy3hKbVxC7xB4JVwfAV7CUf5925tl8TCVX07Byv8JqFdg9n8AWE6SBT
CEg9aNigMrg=
=rl2w
-----END PGP SIGNATURE-----