M
M
Maxim2018-06-19 22:40:29
MySQL
Maxim, 2018-06-19 22:40:29

MYSQL How to transcode text from cp1251 to utf 8?

Hello! There are sql tables of cities, regions and countries and values ​​in them. Values ​​are encoded cp1251 I would like to convert them to utf8 How to do it quickly?

INSERT INTO `city` VALUES (10664, 10648, 10663, 'Èéâàñêèëà');

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Roman Mirilaczvili, 2018-06-20
@myks92

On Linux it's easy:
If the data is already in the DBMS, then you need to:
1. make a backup copy to a file,
2. convert the file with the command above,
3. configure the server for a new encoding,
4. Restore from the converted file.

R
Rsa97, 2018-06-19
@Rsa97

Open in Notepad++ and give the command Encodings->Convert to UTF-8 without BOM

A
AVKor, 2018-06-19
@AVKor

I do not know what is available on the poppy. Any transcoder from one to another. Linux has enconv, iconv.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question