Skip to content
This repository was archived by the owner on Mar 31, 2018. It is now read-only.
This repository was archived by the owner on Mar 31, 2018. It is now read-only.

Ensure DB set up correctly to use configured charset (which should be utf8mb4) #227

@zpchavez

Description

@zpchavez

This wasn't working on another project. The fix specified below did the trick.

Acceptance Criteria

  1. DB should be able to input and output anything you can throw at it.

Tasks

  1. Set up a service provider that does this
$charset = $app['config']->load('db')['charset'];

$app['db']->query("set names {$charset}", DbAdapter::QUERY_MODE_EXECUTE);
$app['db']->query("set character_set_client={$charset}", DbAdapter::QUERY_MODE_EXECUTE);
$app['db']->query("set character_set_connection={$charset}", DbAdapter::QUERY_MODE_EXECUTE);
$app['db']->query("set character_set_results={$charset}", DbAdapter::QUERY_MODE_EXECUTE);
$app['db']->query("set character_set_server={$charset}", DbAdapter::QUERY_MODE_EXECUTE);

Additional Notes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions