Questions tagged [utf-8]

Unicode variable-width character encoding (between 1 and 4 bytes per code point).

107 questions
221
votes
2 answers

Create a MySQL database with charset UTF-8

I'm new to MySQL and I would like to know: How can I create a database with charset utf-8 like I did in navicat? create mydatabase; ...seems to be using some kind of default charset.
user3397998
  • 2,321
  • 2
  • 13
  • 4
21
votes
1 answer

Querying non-ASCII rows from Postgres

Does [:ascii:] class work in Postgres at all? It is not listed in their help, however I see examples in the web which utilize it. I have a UTF-8 database, where collation and c_type are en_US.UTF-8, and Postgres version is 9.6.2. When I search for…
Suncatcher
  • 377
  • 2
  • 4
  • 12
20
votes
3 answers

Set value of character_set_client to utf8mb4

I'm trying to convert my DB to utf8mb4 following this guide. I have set: [client] default-character-set=utf8mb4 [mysql] default-character-set=utf8mb4 [mysqld] init-connect='SET NAMES…
qwaz
  • 305
  • 1
  • 2
  • 7
16
votes
1 answer

Encoding issue with SQL Server VARCHAR column retrieved in Python

We recently had an issue with encoding related to a field that's being stored as a varchar(120) in SQL Server. In SSMS, the varchar appears as: "Who Killed JonBen‚t?" However, when it's brought into python, it appears as: I've researched this…
Eric
  • 263
  • 1
  • 2
  • 9
12
votes
1 answer

Why default character_set_server is latin1?

I am using MySQL 5.5 and when I show variables about charset, I have +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ |…
Yoga
  • 549
  • 3
  • 8
  • 15
12
votes
2 answers

Upgrade all MySQL columns, tables, and databases from utf8mb3 to utf8mb4

I have thousands of columns across hundreds of tables in about a hundred databases inside a MySQL instance that need to be upgraded from utf8mb3 to utf8mb4. Is there a way to generate ALTER statements for every table and column that needs to…
Stephen Ostermiller
  • 423
  • 1
  • 3
  • 10
12
votes
2 answers

When `nvarchar/nchar` is going to be used with SQL Server 2019?

With SQL Server 2019 Microsoft introduces UTF-8 support for CHAR and VARCHAR data types and says: This feature may provide significant storage savings, depending on the character set in use. For example, changing an existing column data type…
gotqn
  • 4,348
  • 11
  • 52
  • 91
10
votes
1 answer

Convert MySQL database from latin1 to utf8mb4 - and take care of German umlauts

I am using 5.6.28 MySQL Community Server to host WordPress + ProPhoto blog in German language at CentOS 6.7 Linux server: mysql> show tables; +-----------------------+ | Tables_in_blog | +-----------------------+ | wp_commentmeta | |…
Alexander Farber
  • 405
  • 3
  • 7
  • 19
9
votes
1 answer

MySQL: Illegal mix of collations

I've tried using a stored procedure to create indices, and got the following error: ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' There's no line…
Adam Matan
  • 12,079
  • 30
  • 82
  • 96
9
votes
2 answers

Why does Oracle use a different byte length than java for the supplementary unicode character chipmunk?

I have java code trimming a UTF-8 string to the size of my Oracle (11.2.0.4.0) column which ends up throwing an error because java and Oracle see the string as different byte lengths. I've verified my NLS_CHARACTERSET parameter in Oracle is…
agradl
  • 211
  • 2
  • 6
6
votes
2 answers

MySQL silently replaces UTF chars with literal question marks

I'm experiencing a situation similar to this SO question i.e. I'm working with a legacy database which has UTF8 content in latin1 tables (pretty ugly I know). Now I'm getting new data from a new application which is completely utf8 and works with…
Fabio
  • 169
  • 1
  • 1
  • 11
6
votes
2 answers

MySQL What charset/collation for Case insensitivity and Accent sensitivity?

I am looking for a charset/collation that would make it so when I do a SELECT * FROM table_name WHERE username = "Warrior" It only returns me the rows where username = "Warrior", "warrior" or "WARRIOR", and not "WÂRRÎOR" "Wârrîor" etc. I found a…
lyeaf
  • 307
  • 2
  • 11
5
votes
2 answers

How to convert mysql database charset to utf-8

I have a vb forum with a huge amount of data I need a way to convert this forum database tables charset with thier data from latin1_swedish_ci to utf8-general-ci How to do this ?
5
votes
1 answer

postgresql matching or converting utf-8 variant strings

Postgres 13 I am looking for a way to search UTF-8 text that may have variant character representations ( what is the proper term for this? ie vs life ) within postgresql. I am running into issues matching variant characters, consider -- This works…
5
votes
1 answer

What is the difference between different utf8mb4 binary collations?

What is the difference between utf8mb4_0900_bin vs utf8mb4_bin binary collations?
mvorisek
  • 428
  • 1
  • 5
  • 20
1
2 3 4 5 6 7 8