Link to home
Start Free TrialLog in
Avatar of manojvelliyatt
manojvelliyatt

asked on

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

Avatar of zzynx
zzynx
Flag of Belgium image

Why not use "eur" instead of "€"?
Try

COMEDY_ANGRYKID.savetargetprice=\u20ac1

or it could be

COMEDY_ANGRYKID.savetargetprice=\\u20ac1


ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
:-)