Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: what is the encoding in CDF ??

  1. #1
    Join Date
    Aug 2009
    Posts
    122

    Default what is the encoding in CDF ??

    Hi, guys.

    I found some bad character in my query result when the result is Asian character .

    My oracle database encoding is GBK, so i think CDF use unicode or UTF-8 ?? If the database client and database server have different encoding, the result will be influenced. So i want to keep them in same encoding

    by the way, i read some code "encode_prepare(Dashboards.getQueryParameter('year' )); "
    My questions are,
    1. what does "encode_prepare" do?
    2. where is the document of "Dashboards", i want to see other functions of "Dashboards".

    Thanks in advanced.

  2. #2
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    1. aims to convert to utf8. There are some issues with it, not a very clear funcionallity

    2. only the source. There are not many, but we need to put a page to describe them
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3

    Default

    Hi,
    We are also having problems with encoding and CDF-DD: in a UTF-8 server (linux), when we make an OLAP Datasource from a browser in Windows XP, CDF-DD save the query in non UTF-8 encoding, so the dashboard execution is wrong. If we execute the query with a New Analysis view, it works fine.
    Where can we take a look to solve the problem?
    Thanks in advance.

  4. #4
    Join Date
    Aug 2009
    Posts
    122

    Default

    Quote Originally Posted by Angel Alberto View Post
    Hi,
    We are also having problems with encoding and CDF-DD: in a UTF-8 server (linux), when we make an OLAP Datasource from a browser in Windows XP, CDF-DD save the query in non UTF-8 encoding, so the dashboard execution is wrong. If we execute the query with a New Analysis view, it works fine.
    Where can we take a look to solve the problem?
    Thanks in advance.
    May be you should modify the file you saved. Using pentaho design studio(pds), you can see the detail code of Analysis view, so you can change the mdx query.

  5. #5
    Join Date
    Aug 2009
    Posts
    122

    Default

    i read some code in cdf/components/jtable.xaction
    Code:
    var results = new java.lang.String(obj.toString().getBytes("utf8"));
    i think it turn result into UTF8 encoding, right?

    well , is it possible to add some code for changing it into GBK encoding?

  6. #6
    Join Date
    Aug 2009
    Posts
    122

    Default

    Unfortunately, i failed.

    My code is
    Code:
    var results = new java.lang.String(obj.toString().getBytes("utf8"));
    		var b = results.getBytes("8559_1");
    
    		results = new java.lang.String(b,"GBK");
    The result is bad. Before i change the code, i can see some right characters.
    However, i see no right character after i change the code.

    did i do anything wrong? (My database encoding is GBK)

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.