Reading Euro(€) from property file

Posted on 2005-05-13
Last Modified: 2010-05-18

Can anybody give a solution for the below problem.

i have got a property file which has a got a euro(€) symbol in one of the property values.
like COMEDY_ANGRYKID.savetargetprice=(€1).
i want to read this value and comapre with another value that is stord in XML file.

i am using below code for reading the property file.
                  props.load(new FileInputStream(                  propertiesDirectory + "/"));
definitly it is not returning me the proper value.Euro is not supported in ISO 8859-1  encoding which property file is using.
i have tried changing the Locale by passing -Duser.language=en -Duser.region=IE_EURO but no use.

How i can read that value from property file? is there is any other solution rather than changing the property file to XML file for storing the values.

All inputs are welcome.

manoj velliyatt

Question by:manojvelliyatt
    LVL 37

    Expert Comment

    Why not use "eur" instead of "€"?
    LVL 86

    Expert Comment



    or it could be


    LVL 86

    Accepted Solution


    That's the one. Works fine for me. Don't try to print it to the console unless the console can support it. Instead  try

    JOptionPane.showMessageDialog(null, props.getProperty("COMEDY_ANGRYKID.savetargetprice"));
    LVL 86

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now