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

The encoding/charset is hard coded to 'utf8' #74

Open
wywywywy opened this issue Oct 18, 2019 · 1 comment
Open

The encoding/charset is hard coded to 'utf8' #74

wywywywy opened this issue Oct 18, 2019 · 1 comment

Comments

@wywywywy
Copy link

The encoding is hard coded to 'utf8', which can cause a ER_COLLATION_CHARSET_MISMATCH error.

As 'utf8' is not compatible with a number of collations, e.g. the utf8mb4 variants, some of the functions will not work.

What it should do, is to use the one in config.knex.connection.charset if specified, alternatively we can have a new entry config.dbManager.charset.

I am speaking in the context of MySQL because I'm not too familiar with Postgres, but I guess it's probably the same.

Example -

return self._masterQuery("CREATE DATABASE ?? DEFAULT CHARACTER SET utf8 DEFAULT COLLATE ?", [databaseName, locale]);

@elhigu
Copy link

elhigu commented Feb 10, 2020

I would prefer config.dbManager.charset feel free to send PR for this.

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

2 participants