Encoding of included JSON files
Tuesday, October 7th, 2008Lately I had a problem with a page which was including two JSON scripts, one encoded in UTF-8 and the other encoded in ISO-8859-1.
In some circumstances (and in some browsers) the strings where not showed correctly.
Hunting down the problem required a good dose of my favourite tool wget -S where the -S option causes the [...]
Maven and the encoding of Java files
Friday, October 3rd, 2008I was mavenizing a java project (I was using ant earlier) on my macbook and I realized that since I was using UTF-8 on my macbook the files were compiled using UTF-8 instead of ISO-8859-1 (some strings where corrupted).
The solution is to add the encoding parameter to the maven-compiler-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<encoding>ISO-8859-1</encoding>
</configuration>
</plugin>