KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

UTF-8 not working #278

Open Jose opened this topic on on May 11, 2018 - 1 comments

Jose commented on May 11, 2018

Hello.

Event declaring the UTF-8 value at the "charset" property at the DataSource object creation, I still get weird characters at my report.

I'm using SQLSRVDataSource.

Please Help

KoolReport commented on May 12, 2018

Although we specify UTF-8 in connection however the data in your database could be in other charset. so you can do this:

$this->src('yoursource')->query("SELECT myfield ... ")
->pipe(new Custom(function($data){
    $data["myfield"] = utf8_encode($data["myfield"]);
    return $data;
}))
...

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None