IntelliJ Java IDE
The moose likes JSP and the fly likes display the euro symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "display the euro symbol "�"" Watch "display the euro symbol "�"" New topic
Author

display the euro symbol "�"

heiner weilandt
Ranch Hand

Joined: Sep 10, 2002
Posts: 46
hi,
i want to display the currency euro in a browser (JSP with a bean) and i got the problem that the "�" is displayed as a "?". by using System.out.println() the "�" is correctly displayed in the command. in html, i use "iso-8859-15".
---------------------------
Locale locale = new Locale ("fr","FR","EURO");
NumberFormat format = NumberFormat.getCurrencyInstance(locale);
return format.format(1234.56);
---------------------------
i use tomcat 4 and websphere 4 with jdk 1.3.1
thanks for help
heiner
[ March 06, 2003: Message edited by: heiner weilandt ]
Zabe Agha
Greenhorn

Joined: Feb 27, 2003
Posts: 19
OK, I'm having trouble posting the answer since it's being interpreted by the HTML. You might want to try ("The equivelant of"):
ampresand euro;
(but without the space in between the ampresand and the euro
[ March 06, 2003: Message edited by: Aurangzeb Agha ]
heiner weilandt
Ranch Hand

Joined: Sep 10, 2002
Posts: 46
i dont't want to display the euro-symbol by hand. i want to use the upper code to convert automaticly the currency by the Locale.
i think it is a problem by convert from html to internal java codepage. i use the jsp(html) and the java System.out.println() display this as "?". then i returned this "?" symbol by a getter-method to the jsp(html) and it's a "�" ???

i believe the Locale have the same problem to convert from java into this html-code, in this case iso-8859-15.
what is the internal java codepage ?
what can i do to convert between this two sides ?
or i'm wrong ?
Zabe Agha
Greenhorn

Joined: Feb 27, 2003
Posts: 19
See the above answer--I've edited it.
heiner weilandt
Ranch Hand

Joined: Sep 10, 2002
Posts: 46
thanx for your answer, but it's my opinion to use the Locale without scanning any string to convert by hand.
i believe the right questions is to convert the java-internal-codepage to iso-8859-15.
[ March 06, 2003: Message edited by: heiner weilandt ]
 
 
subject: display the euro symbol "�"
 
Threads others viewed
PhaseListener: before or after which phase should I set the locale?
How to display euro sign into a xhtml page
Special char issue
problen about unreadable character when a currency character is expected(CHINESE)
Euro Character Issue in Linux
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture