Unicode variable-width character encoding (between 1 and 4 bytes per code point).
Questions tagged [utf-8]
88 questions
200
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,111
- 2
- 10
- 4
17
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
- 337
- 2
- 4
- 12
15
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
- 255
- 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
- 509
- 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,559
- 9
- 40
- 72
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
- 10,129
- 27
- 75
- 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
- 1
- 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
- 5
- 17
5
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
- 151
- 1
- 1
- 10
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
4
votes
1 answer
Encoding Debug UTF8 & Latin 1
We have on our DB some international people that got some characters saved incorrectly on our DB (MS SQL-Server 2008 R2).
For example we have strings like 'WilcoxonÃ'.
We got this data into the db because we take international submissions…
Federico Giust
- 435
- 1
- 8
- 16
4
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 ?
Muhamad Bhaa Asfour
- 185
- 1
- 6
4
votes
1 answer
What is difference between Arabic_100_CS_AS_KS_WS_SC_UTF8 and Latin1_General_100_CS_AS_KS_WS_SC_UTF8?
Starting from SQL Server 2019, it supports UTF-8 as collation. However, according to the following queries:
SELECT COLLATIONPROPERTY('Arabic_100_CS_AS_KS_WS_SC_UTF8', 'CodePage')
SELECT COLLATIONPROPERTY('Latin1_General_100_CS_AS_KS_WS_SC_UTF8',…
Eng.Fouad
- 143
- 4
4
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
- 394
- 1
- 3
- 16