Friday, July 22, 2011

Accented (international) characters in pentaho user console

The biggest disadvantage of a software made in USA is that they sometimes forget is that not everyone speaks English (and I'm the first one to admit that life would be simpler if we all did).


And most of the folks that *don't* sometimes need accented characters. And there's a few issues with PUC when trying, for instance, to create directories with accented characters (see picture)




There are 2 things you need to do to fix. The basic idea is: always work with utf-8 everywere: file encodings, database connections, browser encoding. It will save years of your life.

  1. Modify your start-pentaho.bat/start-pentaho.sh to add the option -Dfile.encoding=utf-8
  2. Modify webapps/pentaho/mantle/Mantle.jsp to add the following snippet:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Restart your server. It will work.


ps1: this was a request of one of the Ctools student in Brazil. Come meet us in one of the others to get your deepest questions answered

ps2: Thanks for helping me out here, Nick B. ;)

10 comments:

  1. Hi Pedro,

    thanks a lot for the post.
    Any idea or solution to the similar problem when we work with analysis view?
    Both filenames and analysis content, have problems with encoding.

    Best regards

    Mariano

    ReplyDelete
  2. Pedro,
    The course in Sao Paulo, Brazil was great. Thanks man.
    Keep up the good work.

    ReplyDelete
  3. Hi,

    I think there has to be "http-equiv" instead of "equiv". At least my browser doesn't set utf-8 encoding if not so

    ReplyDelete
  4. I have tried as your explain above but it didn't work. Could you post the two sample files as your mention.

    Thank you very much

    ReplyDelete
  5. Hello,
    I dont't know where I should put the:
    -Dfile.encoding=utf-8
    I receive a error mensage, can you tell in what line we can past this option?

    Thanks for your help,

    Paulo

    ReplyDelete
  6. I know that inside start_pentaho.bat but I don't know the line where i should past it. Can you give an example please?.

    Thanks a lot,

    Paulo

    ReplyDelete
  7. Hello,

    I add:
    set CATALINA_OPTS=-Dfile.encoding=UTF-8
    set JAVA_OPTS=-Dfile.encoding=UTF-8
    and works.

    Thanks a lot,

    Paulo

    ReplyDelete