Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Euro Character Issue in Linux

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you are probably not setting the encoding in you JSP correctly. Have a read of this.
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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; ?
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ?
 
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic