410 questions
-2
votes
1
answer
73
views
Docker and MySQL 8.0 [closed]
I run a docker container with a mysql 8.0 database, Connect to it, check that the encoding is suitable for Cyrillic
mysql > SHOW VARIABLES LIKE 'collation_database';
+--------------------+----------...
0
votes
0
answers
27
views
Upgrading from mysql 5 to mysql 8 gets me Incorrect string value [duplicate]
I am upgrading a system from mysql5 to mysql8 and got an error and I don't know how to fix it. I hope you can advise me.
I created my tables from scratch with default settings for collation with all ...
1
vote
1
answer
446
views
MySQL8 Docker Image - UTF-8 issues
I'm having an issue getting UTF-8 characters to work in the MySQL command line when I am running MySQL 8 in a Docker container.
When I copy and paste a UTF-8 character into Terminal, the character is ...
1
vote
2
answers
72
views
How to perform validation on the coding that does not support data beyond BMP character encoding
My database is utf8 and does not support inserting data beyond BMP character encoding such as emoticons. But I don't want to set the database to utf8mb4. How to perform validation on the backend that ...
0
votes
0
answers
49
views
Data with utf8_unicode_ci and utf8mb4_unicode_ci dispaly error in text via php [duplicate]
Old Server - with mysql 5.7.33 and data / article content was saved in utf8_unicode_ci as it contains Devnagari / Hindi Font content
Data saved in db, database structure with collation and ourput is ...
0
votes
1
answer
169
views
phpmyadmin database collation issue for utf8mb4
I am using phpmyadmin mysql version 8.0.31
Default Server Connection Collation in phpmyadmin of new server is shown = utf8mb4_unicode_ci
When I download mysql database from old server with mysql v 5.7....
1
vote
1
answer
314
views
Is it possible to have emojis in mySQL table names?
Let's say if I'm making a website where I let people using emojis in their username, and I will have a table for each user to store their info/profiles/etc.., and the name of will be the same as their ...
1
vote
1
answer
111
views
Algorithm to convert UTF8 4 byte string to a UTF16 string in C
I have a requirement to convert a UTF8 4 byte string to a UTF16 string in C.
I am not allowed to use any external libraries to support it. I already have a macro defined to support the UTF8 3 byte to ...
0
votes
1
answer
180
views
MariaDB: Insert fails due to random Unicode codepoint
I’m using MariaDB 10.6.16, but reproduced the same behaviour with 10.3.39, too. My problem is this little SQL snippet:
CREATE TABLE problem (
text TEXT
) CHARACTER SET utf8mb4 COLLATE ...
1
vote
4
answers
2k
views
how do I find non UTF-8 characters in mysql (mariadb) data using mysql or PHP
I am using
mysql Ver 15.1 Distrib 10.3.39-MariaDB, for Linux (x86_64) using readline 5.1
PHP 8.2.13 (cli) (built: Nov 24 2023 09:33:30) (NTS)
I would like to use either or both of these to find data ...
0
votes
2
answers
3k
views
utf8_encode and mb_convert_encoding Conflicting Resuts [duplicate]
I have a very annoying issue when transferring data from PHP (which is set up with default_charset = 'UTF-8') to MySQL, on an IIS environment with web.config set to:
<globalization requestEncoding=&...
0
votes
1
answer
368
views
issues connecting MySQL workbench to Power BI
I am unable to connect my DB to Power Bi after installing the correct connectors.
Details: "An error happened while reading data from the provider: 'Character set 'utf8mb3' is not supported by ....
0
votes
1
answer
512
views
whether magento 2.4.6 support utf8mb4 [duplicate]
currently i work magento website based 2.4.6.
when customer sso login from line, there are some EmoJi characters. When use utf8mb3, it show ???. We need change mariadb to be utf8mb4.
when run bin/...
0
votes
1
answer
179
views
How to wrap 32-bit (4 bytes) emojis in arbitrary string using PHP?
I'm using this PHP function to wrap emojis in arbitrary HTML tags, which allows me to style them on web pages, since CSS3 does not (yet?) directly support styling of multi-byte characters, at least I ...
0
votes
0
answers
23
views
Mysql select data not working because string is utf-8 [duplicate]
I'm having a problem while executing a SELECT query. Namely, I use an external API to analyze whether articles are in my database. I noticed that the source encoding is UTF-8 while my base encoding is ...
0
votes
0
answers
54
views
Cant change charset of database
Now I have character set utf8mb3 for my database. I want to change it to utf8mb4. For this task, I create a script, that creates SQL script, that doing it. This script can generate rows like this:
...
1
vote
0
answers
209
views
JPABuddy Liquibase Init generation of MySQL uses utf8mb3 for nvarchar?
I uses JPABuddy to generate an init Liquibase db for MySQL 8.0.33 DB. I notices that for nvarchar datatype it uses character set utf8mb3, collation utf8mb3_general_ci which are deprecated, instead ...
1
vote
1
answer
820
views
MySQL: Illegal mix of collations: both same collation
I see a number of questions on SO regarding something similar, but none of them addresses this particular detail.
I created a database using something like this:
CREATE DATABASE db CHARACTER SET ...
0
votes
1
answer
2k
views
Issue when migrating data in charset latin1 from MySQL 5.7 to 8.0
My company faced an unpleasant issue when we upgraded our MySQL DB hosted in AWS RDS from version 5.7 to 8.0.
Initially, we had MySQL 5.7, where the previous dev team left the charsets and collations ...
0
votes
1
answer
105
views
Tcl, database insertion mysqlexec/db server: Incorrect string value: [duplicate]
I have a weird issue for several years now. Here's the thing.
I run Rocky Linux (happens also in CentOS), running Apache 2.4.53 wiith MariaDB (mysql Ver 8.0.30 for Linux on x86_64 (Source ...
1
vote
3
answers
677
views
Using like with mariadb and chinese characters
I come back with utf8mb4 character issues. I'm using mariadb Server version: 10.3.37-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04 on a local machine with Linux Mint 20.3.
Here is a test table:
CREATE TABLE ...
2
votes
1
answer
918
views
How to store emojis in a MySQL table? Tried everything
I have a CSV file containing tweets with emojis (eg. "Cool! 💕") and I need to import them into a MySQL table in such a way they will be saved/displayed correctly...
What do I have to set up ...
0
votes
1
answer
278
views
How to use emojis (or other utf8mb4) characters in a column alias of a MySQL query?
I'm using SuiteCRM 7 with a MySQL 8.0.31 database. I have taken steps to migrate the MySQL database to accept utf8mb4 characters which works well when entering in, say, emojis into table data either ...
1
vote
0
answers
295
views
PHP json encode and Node.js decode utf8mb4_unicode_ci strings
On my server, the database is encode in utf8mb4_unicode_ci
I'm writing an API to serve data in JSON.
The PHP function json_encode only accepts utf8.
I'm not able to build the full chain:
strings ...
-1
votes
1
answer
45
views
Prints results including HTML Entity code instead of value itself
When I edit a data value, the output it prints includes the HTML entity along with the value itself.
Example:
Expected text: Absence &
Obtained text: <p>Ausence &</p>
I'm ...
1
vote
1
answer
18k
views
How to insert special characters in SQL Server? [duplicate]
Much like this question in MySQL, I am trying to retain special characters such emojis into an nvarchar type column. However, any emojis are converted to "??". I have tried to reproduce the ...
0
votes
0
answers
25
views
How to convert a MySQL table's character set and collation to UTF-8? [duplicate]
This has been asked before and answered: How to convert an entire MySQL database characterset and collation to UTF-8?
The right answer is along the lines of:
ALTER TABLE tablename CONVERT TO CHARACTER ...
2
votes
1
answer
500
views
execute failed: Incorrect string value: '\xE4rvine...' with mariadb and perl DBD
More than three years ago I posted a similar question related to not being able to insert data into a table because of what I believe is an incorrect character set, and I'm having the same problem ...
0
votes
0
answers
18
views
Save SQL in Windows, to upload in Plesk [duplicate]
Very confused about charsets.
I've a script to download a .sql file that contains Sql tables. I use MySql.
My tables are like this:
CREATE TABLE `xxx` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`...
3
votes
1
answer
3k
views
MySQL to postgres migration issue
I want to migrate my project from MySQL to postgres, I have one table in MySQL, in which utf8mb4 set for particular column in a table, what alternative is there in postgres to set in column for ...
1
vote
1
answer
2k
views
Laravel exception: 1366 Incorrect string value: '\\xC0\\xA7\\xC0\\xA2%2...' for column 'user_agent'
Occasionally I will get the following exception thrown from Laravel:
"class": "Illuminate\\Database\\QueryException",
"message": "SQLSTATE[HY000]: General error: ...
5
votes
3
answers
16k
views
ERROR 1300 (HY000): Invalid utf8mb4 character string: 'Paysand'
I was trying to import csv data file using command prompt in MySQL Workbench (mysql Ver 8.0.30 for Win64 on x86_64 (MySQL Community Server - GPL)).
Using following steps:
mysql>
load data local ...
2
votes
2
answers
1k
views
UTF8-mb4 in Kafka
I have a UTF8-mb4 char in mongo and have a java extractor which extracts data from mongo and put into kafka. When the data goes to Kafka the special char has been replaced with \u...
Sample text:- &...
0
votes
1
answer
2k
views
How to get mysqldump to export a database in the right encoding and collation?
I'm having a problem with the encoding when dumping a database using mysqldump.
The issue is that the file being generated is breaking non-ASCII characters (for ex. german and spanish characters). The ...
3
votes
1
answer
3k
views
MySQL: 1366 Incorrect string value: '\xE0' in utf8mb4 column
I'm getting errors when certain characters are being added to a table... even when the column is has utf8mb4 character set. For example:
SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\...
-1
votes
1
answer
142
views
mySQL optimizations - Compact type type, InnoDB and UTF8MB4
I'm using a community forum site software package.
In the dashboard the automated software reports some suggestions to make the site more efficient.
The recommendations are/were to:
Use dynamic table ...
0
votes
2
answers
1k
views
How do I to export utf8mb4 mysql data using php to a csv file
I am looking for help on a csv file export.
I have a mysql database encoded as utf8mb4 (unicode_ci) with a table using collation utf8mb4_unicode_ci for my fields. The data contains special characters ...
1
vote
0
answers
193
views
Table with latin1 collation slow query, fast with utf8mb4 - why?
Table A is 25k rows with a dozen columns, about 8mb of total data set to latin1.
Table B has 2000 rows with two dozen columns, about 5mb of total data set to utf8mb3.
Doing an inner join between the ...
0
votes
1
answer
297
views
how to convert raw utf8mb4_unicode_ci like X'313735313136' to a regular string (utf8) in php
This question is about converting a raw utf8mb4_unicode_ci from a .sql to a normal utf-8
My .sql was from a database that had COLLATE utf8mb4_unicode_ci
like this :
(5558,'2019-11-18 18:28:36',X'...
0
votes
3
answers
13k
views
General error: 3988 Conversion from collation utf8_unicode_ci into utf8mb4_0900_ai_ci impossible for parameter
I'm trying to save a string containing html of an email in a text type column. but i'm getting this error. I failed finding where's the incompatible caractere. There is any sanitizing method that i ...
0
votes
2
answers
125
views
MySQL 5.7 select where Unicode SMP area char equal
I want to select table use character in Unicode CJK Extension-B.
select * from saseung where hanja = '𦤎';
But the result shows all CJK Extension-B characters in the table.
𦤎, 𦥑, 𣩭, 𦇗, 𨙄, etc
I ...
0
votes
2
answers
360
views
"Incorrect string value" when trying to insert UTF-8 into MySQL from Rails
While debugging my Rails App I found the following messages in the log file:
(0.1ms) ROLLBACK
Completed 500 Internal Server Error in 25ms (ActiveRecord: 4.2ms)
ActiveRecord::StatementInvalid (Mysql2::...
0
votes
1
answer
425
views
Python/Mysql UTF8/UTF8MB4 configuration problem?
Since last release of Wordpress I get a
/usr/lib/python3/dist-packages/pymysql/cursors.py:170: Warning: (3719, "'utf8' is currently an alias for the character set UTF8MB3, but will be an alias ...
0
votes
0
answers
34
views
Still get the replacement character error even after modifying the table characterset and collation
The MySQL version is 8.0.16
I modified the table character set and collation :
alter table pdrintervention character set utf8mb4 collate utf8mb4_0900_ai_ci;
At runtime I still get the Incorrect ...
2
votes
1
answer
8k
views
Incorrect string value \xF0\x9F\x98\x8A\xF0\x9F... for column 'desc'
I'm having this error and still don't know why.
I predict it's happen because some users try to use an emoji. But I try a lot of emoji and it all work.
I use Mysql 5.7
I already set column to COLLATE ...
2
votes
3
answers
2k
views
UTF-8 decoding when reading a MySQL column of type JSON (vs. TEXT), using Perl DBI + DBD::mysql
Here is the problem, in a working unit test. I think it's either a bug in DBI + DBD::mysql, with respect to how it handles MySQL JSON columns, or a bug in my brain.
use strict;
use warnings;
use utf8;...
0
votes
2
answers
3k
views
How does php utf8_decode deal with utf8mb4? [duplicate]
I am working on localhost windows10 apache 2.4: Apache/2.4.51 (Win64) OpenSSL/1.1.1l PHP/8.0.11and Database client version: libmysql - mysqlnd 8.0.11 which uses the server Server version: 10.4.21-...
0
votes
1
answer
613
views
Hi, I am trying to find all instances of utf8mb4_bin in my table, using REGEXP, but cannot get the right results
I can find single chars using:
SELECT * FROM table WHERE column LIKE '%Â%' COLLATE utf8mb4_bin;
-- 1 result: 246.8 ± 11.7
I have tried a dozen or more REGEXP with COLLATE utf8mb4_bin, but none ...
3
votes
0
answers
519
views
mysql 1300 Invalid utf8mb4 character string: '\\xF0\\x9F\\x91\\x8C' with Unicode emoji
So I'm trying to commit unicode emoji to database (this one especially:👌)
But everytime something with emoji is executed on database this happens:
pymysql.err.OperationalError: (1300, "Invalid ...
0
votes
1
answer
232
views
MariaDB query won't run via PHP, works manually with HeidiSQL; en dash encoding issue; proper DB utf8mb4 character set and collation
I'm importing emails from a Gmail account and storing them in a database. Apparently my PHP logic to convert everything to UTF-8 has failed with one particular email and when I run the query with that ...