This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes Euro Character Issue in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Euro Character Issue in Linux" Watch "Euro Character Issue in Linux" New topic
Author

Euro Character Issue in Linux

Pradeep Daniel
Greenhorn

Joined: Oct 11, 2006
Posts: 12
Hi,
I am using Fedora core 2 linux with Oracle 10g and tomcat 4 and Java 1.4. I am reading values from DB and creating an XML. The database contains a Currency column in which ther is Euro Symbol(�). After constructing the XML i am ale to see the exact euro symbol in XMl. But if i read it and display in the browser i am getting a ? symbol. But if a generate the same XMl from windows environment with the DB in the same linux machine. I an getting a Junk character in XMl but its getting displayed properly in the JSP page. Please provide me a solution
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Sounds like you are probably not setting the encoding in you JSP correctly. Have a read of this.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
Originally posted by Paul Sturrock:
Sounds like you are probably not setting the encoding in you JSP correctly.


The post says that its getting displayed properly in jsp.

What is the junk character you are getting in XML .Does the junk character look like &#xxx; ?


Rahul Bhattacharjee
LinkedIn - Blog
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


The post says that its getting displayed properly in jsp.

You don't need to set the JSP encoding properly for this to happen, Rahul. It may happen because the browser you are using can work out how to render content correctly, but this is not a reliable way to do this (have a re-read of the article I posted above, it cover this).
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
Thanks Paul for the link.It explains a lot about encoding and UTF.

As Pradeep posted of noticing junk character in XML , I thought that he might have noticed escaped entity of euro and thinking that of junk.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

That's a good call Rahul - I hadn't thought of that . I suppose it might be that IE (if that is the browser he is using) renders the escaped entity as a euro when using it as an XML viewer?
AtulKumar Gaur
Ranch Hand

Joined: Jun 24, 2007
Posts: 40
HI
Ranchers
Is there some gift provided by Sun like Tshirt for whome who cleared SCJP1.4 with good score.Please explore this.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
Originally posted by AtulKumar Gaur:
HI
Ranchers
Is there some gift provided by Sun like Tshirt for whome who cleared SCJP1.4 with good score.Please explore this.


I do not think its related to this thread.

Anyways , where is the link ?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Euro Character Issue in Linux
 
Similar Threads
XML Parsing -> Character encoding and Euro sign
UTF-8 problem in unmarshaling
Euro Currency Formatting In Linux
Problem with storing of Euro ( � ) in the DB from text area
Display euro symbol in CSV with xml + xslt