9 Replies Latest reply on Feb 1, 2013 3:39 PM by Jan Nawara

    set_custom_property and UTF-8 encoding

    Jan Nawara
      I have a PJC that we wrote to allow us to read and write files to the file system. We are now trying to move our forms to support UTF-8 to allow characters from Asian countries to show up properly. The forms are working fine and we can read and write Asian characters to and from the database.

      So now for the problem.

      In our code we call set_custom_property on the bean to write a chunk of text to the file. This works fine BUT we are loosing the non ascii characters in the process.

      The string abc汉语/漢語123 ends up as abc????123. (There should be Chinese characters in the first one there if you can't see them.)

      I have verified the string is correct just before the set_Custom_property call (showing it with a message). In the bean, in the setProperty method I used System.out.println to dump out the value parameter to the console.

      Basically something is happening between the call to set_custom_property and the beans setProperty methods that is messing up the encoding.

      Before you ask we cannot convert to something like webutil as that would require recoding hundreds of forms. I believe webutil can handle UTF-8 encoded characters so there must be something I'm doing wrong for it to now work for us.

      Any help is appreciated.