'Which MySQL Charset.xml Contains utf8 & utf8mb4
Im wanting verify that my testing environment will be as close as possible to my production environment. In my test environment's DB I use utf8mb4
as my charset. I decided to make sure that this character set would be available. I was not able to see the corresponding xml
file for utf8
or utf8mb4
in my production environment. However when I decided to also check how the xml
files look in my testing environment, they looked rather similar to the production environment. This leads me to believe that these character sets may be within another file. Which of these files (from test env character_sets_dir
) contain the utf8
and utf8mb4
character sets?
Here are some of my variables which may provide more info (also from test env)
character_set_client = utf8mb4
character_set_connection = utf8mb4
character_set_database = utf8mb4
character_set_filesystem = binary
character_set_results = utf8mb4
character_set_server = latin1
character_set_system = utf8
I decided to open up the index.xml
from above and found this entry. There is no entry for utf8mb4
and no .xml
for either.
<charset name="utf8">
<family>Unicode</family>
<description>UTF-8 Unicode</description>
<alias>utf-8</alias>
<collation name="utf8_general_ci" id="33">
<flag>primary</flag>
<flag>compiled</flag>
</collation>
<collation name="utf8_bin" id="83">
<flag>binary</flag>
<flag>compiled</flag>
</collation>
</charset>
Partially Solved
So I decided to use SHOW CHARACTER SET
in both environments which both returned rows containing utf8
and utf8mb4
. This should indicate that both support what I need but I am still interested as to why the other places I looked do not contain info showing that utf8mb4
is available.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|