0

I am developing micro services for internal use. I have propertie file with properties like

HEAD_ROLE_KEYS=de 1ª Linha-->Área-->Equipa-Coordenadores

In java, reading that property of head_role and print. But it prints like

de 1ª Linha--> Ã�rea-->Equipa-Coordenadores

So my compare operation is failed.

Kindly help me how to get exact value in java. Thanks...

NOTE: file format is UTF-8

AbnSrn
  • 574
  • 2
  • 6
  • 20

2 Answers2

1

java expects property files to be ISO-8859-1 encoded

Marc Stroebel
  • 1,645
  • 1
  • 13
  • 19
0

Things you need to verify:

  1. The editor last used to edit the property file saved the file as UTF-8.
  2. Your program reads the file as UTF-8.
  3. The console where the property file is printed supports UTF-8.
  4. The string constant against which the property value is compared is properly encoded.
Torben
  • 3,469
  • 24
  • 27