Anthony
Anthony

Reputation: 2416

ISO 8859-1 Characters

I am working on an application in which we do translations for English/Spanish/French using a JSON file. I am a bit confused on if I need to use ISO 8859-1 Characters (their entity number) for the extra symbols on Spanish and French words. Everything is rendering properly (ex: é í ñ ¿) but am I not sure if I am doing it incorrectly.

Ex. W/ ISO 8859-1 Characters (these are using entity names, I heard using entity numbers are better?):

  "resultsperpage":"Resultados / Página",

  "customer":"Cliente",

  "corp":"Corporación",

  "displaycorp":"MostrarCorporación",

Ex. Without:

  "resultsperpage":"Resultados / Página",

  "customer":"Cliente",

  "corp":"Corporación",

  "displaycorp":"Mostrar Corporación",

Upvotes: 0

Views: 807

Answers (1)

Wolfgang Kuehn
Wolfgang Kuehn

Reputation: 12926

Use the second approch.

Make absolutely sure you always use the same encoding when programmatically reading or writing to file, or when doing http.

Never rely on the default encoding of your system(s). Always specify your chosen encoding.

Make absolutely sure you always edit these files in the correct encoding.

The encoding itself does not matter. I recommed utf-8 over ISO 8859-1 or others.

Upvotes: 1

Related Questions