US and Worldwide: +1 (866) 660-7555
Results 1 to 2 of 2

Thread: converting Byte[] to string

  1. #1

    Default converting Byte[] to string

    I am trying to display the results of a MYSQL query that contain a byte array as string. I have tried changing the output encoding to UTF-8' through the report designer, but the values still come out as a byte array. Is there any other place in the report designer that lets me control the output encoding in the designer?

  2. #2
    Join Date
    Mar 2003
    Posts
    7,557

    Default

    Byte-Arrays are no strings. They are binary data and we have no way to handle them. In the database world, char or varchar or clobs are used to transport text.

    You can tell the database to convert your binary data into strings via either "CAST(field as STRING)" or "CONVERT(field using UTF-8)".

    @see your database manual:
    http://dev.mysql.com/doc/refman/5.0/...nction_convert
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •