https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15794

M. Tompsett <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from M. Tompsett <[email protected]> ---
mysql> show variables like '%char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | latin1                     |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

mysql> set character_set_database=utf8mb4;
Query OK, 0 rows affected (0.00 sec)

mysql> set character_set_connection=utf8mb4;
Query OK, 0 rows affected (0.00 sec)

mysql> set character_set_client=utf8mb4;
Query OK, 0 rows affected (0.00 sec)

mysql> set character_set_results=utf8mb4;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like '%char%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| 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                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)

mysql> drop database test_unicode;
Query OK, 1 row affected (0.01 sec)

mysql> CREATE DATABASE test_unicode DEFAULT CHARACTER SET utf8 DEFAULT COLLATE
utf8_general_ci;
Query OK, 1 row affected (0.00 sec)

mysql> use test_unicode;
Database changed
mysql> create table simple_table (text varchar(100)) collate utf8_unicode_ci;
Query OK, 0 rows affected (0.01 sec)

mysql> INSERT INTO simple_table VALUES ('💩');
Query OK, 1 row affected, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+-----------------------------------------------------------------------+
| Level   | Code | Message                                                     
         |
+---------+------+-----------------------------------------------------------------------+
| Warning | 1366 | Incorrect string value: '\xF0\x9F\x92\xA9' for column 'text'
at row 1 |
+---------+------+-----------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> delete from simple_table;
Query OK, 1 row affected (0.00 sec)

mysql> drop table simple_table;
Query OK, 0 rows affected (0.00 sec)

mysql> create table simple_table (text varchar(100)) collate
utf8mb4_unicode_ci;
Query OK, 0 rows affected (0.02 sec)

mysql> INSERT INTO simple_table VALUES ('💩');
Query OK, 1 row affected (0.01 sec)

mysql> select * from simple_table;
+------+
| text |
+------+
| 💩     |
+------+
1 row in set (0.00 sec)

mysql>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to