Questions tagged [utf-8]

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

100 questions
211
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,221
  • 2
  • 11
  • 4
19
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
  • 357
  • 2
  • 4
  • 12
17
votes
2 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
  • 275
  • 1
  • 2
  • 7
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
  • 539
  • 3
  • 7
  • 15
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
  • 3,709
  • 10
  • 42
  • 77
12
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
  • 223
  • 1
  • 2
  • 9
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
  • 11,019
  • 29
  • 79
  • 94
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
8
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
  • 365
  • 2
  • 6
  • 17
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
  • 171
  • 1
  • 1
  • 10
6
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…
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
  • 426
  • 1
  • 4
  • 17
5
votes
1 answer

Postgres database encoding problem

I'm striving to convert badly encoded data from my table. For instance, I have a field with Nadège which should be Nadège. I tried using Postgres's functions convert, convert_from, convert_to without much success. db=# SHOW client_encoding; …
Cyrbil
  • 153
  • 1
  • 5
1
2 3 4 5 6 7