Reading Euro(€) from property file

Hi ALL,

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 + "/nowletFunctions.properties"));
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.

regards
manoj velliyatt

manojvelliyattAsked:
Who is Participating?
 
CEHJCommented:
>>COMEDY_ANGRYKID.savetargetprice=\u20ac1

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"));
0
 
zzynxSoftware engineerCommented:
Why not use "eur" instead of "€"?
0
 
CEHJCommented:
Try

COMEDY_ANGRYKID.savetargetprice=\u20ac1

or it could be

COMEDY_ANGRYKID.savetargetprice=\\u20ac1


0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.