Updater Script returns question marks for French accents

I have build a script on the Updater Script section of the Bloomreach CMS which returns information related to different types of content on the logs.

The script runs fine but when it comes to return content in French it does not display correctly the accents, instead of accents it returns question marks simblos.

I believe this is related to the configuration for the character encoding on the Tomcat, but I am not sure where excatly is this configured, anyone knows where can I find this configuration?

There should be a CharacterEncodingFilter in your web.xml. That is ootb from an archetype. I don’t think this is necessarily your issue. Can you share the script?

Actually any script that I run has the encoding problem for the French characters, even the scripts that only display a log with the information of a filed like the title of an article.

by default, tomcat takes system encoding (I belive)…you can force UTF-8 by starting tomcat process with:

-Dfile.encoding=UTF-8

Also, as @jasper.floor mentioned, CharacterEncodingFilter needs to be setup properly: it must be the first filter configured in the filter mappings (before any other filter is hit), otherwise it will not work because tomcat optimizes stuff by caching request/system parameters

adding the -Dfile.encoding property on the tomcat start fixed my issue