tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Sanchez" <apa...@cousas.net>
Subject RE: Fmt:formatNumber, Euro symbol and decimals
Date Tue, 26 Aug 2003 11:29:14 GMT
<fmt:formatNumber value="${product.price}" minFractionDigits="2"
currencySymbol="&euro;" type="currency"/>
works almost the same that my approach and they are the only ways to show an
euro amount in every locale, because 

This formats the number in the current locale currency (not desired)
<fmt:formatNumber value="${product.price}" type="currency"/>


These two works, but in locales where the currency has no decimals (Japan
for example) it will show only the integer part (not desired again)

<fmt:formatNumber value="${product.price}" type="currency"
currencySymbol="&euro;"/>

<fmt:formatNumber value="${product.price}" type="currency"
currencySymbol="€"/>


This show a "?" in ES locale and "EUR" in US locale
This is a strange thing, it doesn't show the decimal part in locales where
the currency has no decimals !!!!!!!!!!!

Maybe this is a bug?

<fmt:formatNumber value="${product.price}" type="currency"
currencyCode="EUR"/>



> -----Mensaje original-----
> De: Daniel Montero [mailto:danim@soin.co.cr]
> Enviado el: lunes, 25 de agosto de 2003 22:47
> Para: Tag Libraries Users List
> Asunto: Re: Fmt:formatNumber and Euro symbol
> 
> 
> 
> Have you tried
> <fmt:formatNumber value="${product.price}" minFractionDigits="2" 
> currencySymbol="&euro;" type="currency"/>
> 
> Hope this helps,
>     danim
> 
> ----- Original Message -----
> From: "Carlos" <apache@cousas.net>
> To: <taglibs-user@jakarta.apache.org>
> Sent: Saturday, August 23, 2003 4:08 AM
> Subject: Fmt:formatNumber and Euro symbol
> 
> 
> > Hi
> >
> > I've tried to format a price in euros with <fmt:formatNumber
> > value="${product.price}" type="currency" currencyCode="EUR"/> But 
> > instead of the euro symbol I get a
> question
> > mark (?)
> >
> > I've tried to set the encoding ISO-8859-15 in many places
> > - jsp page
> > - jsp layout page
> > - controller
> > But none of them worked. Maybe I did it wrong, maybe that's not the 
> > solution?
> >
> > The workaround I had to wrote to get what I expected was: 
> > <fmt:formatNumber value="${product.price}" minFractionDigits="2"/> 
> > &euro; And this worked, but I think there shoould be a
> better solution
> >
> > Please help.
> >
> > Thanks
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 



Mime
View raw message