Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Loading as UTF8 instead of ANSCI String

I am getting a junk char issue of Frenc char in an updated version of Report Builder 21.04. I looked into the code RB implicitly considering the report template as UTF8 instead of ANSI value which is why some chars are showing as junk chars, I am troubleshooting a code but still have not figured out any property to update the encoding default as ANSI.
Please let me know how the Encoding can be set as ANSI instead of UTF8. I am loading the template from the database. If the template, it saved in UTF8. please assist

Comments

  • I am loading a report template from the database, the template has some French Characters, and once the report is loaded, the French chars are converted into some unknown chars. Please assist how to take care of this issue
  • Hi Vineet,

    The report template loading / saving code is not something that has been changing. It has been in place for many years. For Delphi Unicode VCL the String datatype is Unicode and RB templates that are save as text are saved and loaded as UTF8.

    I recommend writing a utility to iterate over the rbItems table and convert the table to store UTF8 strings.

    Another option, is to use the Report.Template.OnLoadStart event to modify the stream. The stream is passed to the event-handler. You could read the stream, convert the text to UTF8 and write it back to the stream.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.