Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: How to write non-ascii characters to a database?

  1. #1

    Default How to write non-ascii characters to a database?

    I'm trying to write non-ascii characters to a database, but I'm finding that they get corrupted. Does anyone have any tips on what I need to configure to make this work properly?

    I'm using an Oracle database, and writing data into a column with a datatype that allows storage of UTF8 data.

  2. #2
    DEinspanjer Guest


    Where is your source data coming from? If it is a text file input step, make sure that the file in question is actually UTF-8 format, and make sure that the TFI step is configured to use UTF-8 for the encoding.

  3. #3


    The source data is coming from a text file. Its a csv file that contains some 8-bit characters, representing western european accented characters. These characters display correctly within Pentaho, so there doesnt appear to be any problem with the file being read correctly.

  4. #4


    I found that for data to be stored correctly, I must configure a java property, e.g.

    java -Doracle.jdbc.defaultNChar=true application_name

    This works ok if I add this flag when I invoke Spoon, but I presume there must be a better/easier way of setting this flag for a specific transformation or database connection? I've tried setting this in the Options panel of the database connection, but that has no effect.

    Does anyone know how I set a java property to take effect within a specific transformation or database connection?

    For more details, see

  5. #5
    DEinspanjer Guest


    I'm not familiar with Oracle, so this is just a wild suggestion, but did you try setting the property in the DB connection properties dialog in Spoon?

  6. #6


    If you mean setting a parameter on the Options panel of the Database Connection dialog, then yes, I tried that, and it had no effect.

    I've found that I can set a java property by including a JavaScript step in my Job which includes:

    java.lang.System.setProperty("oracle.jdbc.defaultNChar", true);

    This has the desired effect, although I still wonder if there isnt a more elegant way to do this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.