Dear Java and HTML, parlez-vous Français?

Today I had to face my mother tongue once again. For one of the very first time in my life as a researcher I had to write a web page that encloses an html form which is gonna be filled with FRENCH sentences.

The thing is the web is designed for English mainly and thus when getting the data out of my form in my Java servlet, I had to face the fact that all beautiful accents (e.g. é,à) of the French language were replaced by rather ugly and random chars.

After a number of attempts I eventually figured-out that changing the meta of the HTML page from:
...meta http-equiv="Content-Type" content="text/html; charset=UTF-8"...

to

.. http-equiv="Content-Type" content="text/html; charset=iso-8859-1"...

did the trick! Thanks ISO for not forgetting that English is not the only language that still exists on the web!

Leave a comment

Your comment