Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get and set charset from connection string #16

Open
ghost opened this issue Apr 7, 2015 · 0 comments
Open

Get and set charset from connection string #16

ghost opened this issue Apr 7, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 7, 2015

The mysql connection string mysqli://user:password@host/database?charset=utf8 allows to add the charset in the query string.

Use $url["query"] in public parseConnection to fetch the query string and look for the charset-parameter using parse_str($url["query"], $array) ... isset($array["charset"]) ...

And apply it to the connection:
$this->getDb()->set_charset(...);
mysql_set_charset(...);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants