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

Encoding problem #263

Closed
mvnaz opened this issue Mar 4, 2018 · 4 comments
Closed

Encoding problem #263

mvnaz opened this issue Mar 4, 2018 · 4 comments

Comments

@mvnaz
Copy link

mvnaz commented Mar 4, 2018

Hello, I use that library. I have problem with encoding.

It doesn't show russian characters correctly, and also chars like that " Frühlingsausläufer überall "

I tried:

'charset' => 'utf8mb4'

@FlipEverything
Copy link
Contributor

I don't think that this is Spot related. You can set charset like this: #227 Maybe you have to set the charset on the client side too. You may check the database structure as well.

If you need further assistance, please be more specific and post the related code.

@dertin
Copy link

dertin commented Apr 9, 2018

Maybe someone can add these two methods to the configuration class. How do they see it?

  $cfg = new \Spot\Config();

  $cfg->addConnection(DB_TYPE_CONFIG, [
            'dbname' => DB_NAME_CONFIG,
            'user' => DB_USER_CONFIG,
            'password' => DB_PASS_CONFIG,
            'host' => DB_HOST_CONFIG,
            'driver' => DB_DRIVER_CONFIG,
   ]);
  
   $cfg->setCharset('utf8');
   
   // SQL: "SET collation_connection = utf8_spanish_ci"
   $cfg->setCollation('utf8_spanish_ci');

@vlucas
Copy link
Collaborator

vlucas commented Aug 1, 2018

These issues are mostly MySQL-specific, which is why the commands are not in the API. I recommend just doing a query first, or altering your tables to specify it in the schema.

@FlipEverything
Copy link
Contributor

Feel free to reopen this issue If you need further assistance!

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

No branches or pull requests

4 participants