Skip to main content

Questions tagged [encoding]

Encoding is a set of rules used to represent data in a form that can be stored and transmitted to another process or system. Character encoding (e.g. Windows-1252, ISO-8859-1, UTF-8, UTF-16) refers to the way character data is represented as a series of bytes. Binary encoding (e.g. Base64) refers to the way binary data is transformed into a series of characters.

0 votes
1 answer
72 views

How do I avoid writing SQL that depends on settings?

PostgreSQL docs note: The bytea type supports two formats for input and output: “hex” format and PostgreSQL's historical “escape” format. Both of these are always accepted on input. The output format ...
Janus Troelsen's user avatar
1 vote
3 answers
245 views

ERROR: invalid byte sequence for encoding "UTF8": 0xdc 0x36

When running a \copy (either pgadmin or aws_s3.table_import_from_s3) of a 1.6GB file into an AWS Aurora Postgres-compatible database, I'm getting the following error: ERROR: invalid byte sequence for ...
claytond's user avatar
  • 123
0 votes
0 answers
143 views

SQLDeveloper encoding and export database

I've been requested to make a dump of an Oracle 11g EE Database. However, i can't use the Oracle Data Pump utility, since I have no direct access to the host machine, nor I think the db user have the ...
Dont Throw Me Away's user avatar
3 votes
2 answers
1k views

What is the collation used while comparing Unicode string literals in SQL Server 2019?

My understanding is that the collation for comparing Unicode string literals is determined by the database collation. My database is using SQL_Latin1_General_CP1_CI_AS collation. When I compare N'ß' ...
QFirstLast's user avatar
1 vote
1 answer
1k views

Upgrading MySQL utf8mb3 to utf8mb4 - how to replicate documentation behaviour?

I'm looking to upgrade MySQL fields from mb3 to mb4 in a large database and from reading the documentation I understand that the biggest problem is mb3 stores stuff in 3 bytes, but mb4 stores stuff in ...
KillerKode's user avatar
2 votes
1 answer
240 views

Insert gives error code 1366 even though charset is utf8mb4

I am trying to manually copy a table from one server to another. I used mysqldump to export the table. The import fails with the following error: ERROR 1366 (22007) at line 6: Incorrect string value: '...
Vongo's user avatar
  • 181
1 vote
0 answers
68 views

Issue with hash storage resulting from password_verify() output

Consider the following code: $random_token = random_bytes(32); $token_hash = password_hash( $random_token, PASSWORD_DEFAULT ); $token_base64 = sodium_bin2base64( $random_token, ...
DevelJoe's user avatar
  • 163
2 votes
1 answer
1k views

Postgres encoding issue - find values that have no equivalent in (client) encoding

I have Postgresql database that internally uses UTF-8 encoding. Some clients that connect to the database use LATIN 2 (ISO 8859-2) client encoding when they connect to database. I can't change the ...
CyberMuz's user avatar
  • 123
1 vote
1 answer
2k views

How to display non-English character correctly in db2cmd?

On Db2 v11.5.7 on Linux/x86_64 I have a UTF-8 database. Executing db2 get db cfg for test1 returns: Database code page = 1208 Database code set = UTF-8 On my Windows 10 computer in ...
folow's user avatar
  • 523
2 votes
1 answer
495 views

How can I detect failure in CONVERT( tbl AS utf8)?

MySQL provides the CONVERT(`tbl` AS utf8) expression to transcode text from one charset to another. Sometimes that conversion cannot succeed, because the destination charset does not include ...
Jim DeLaHunt's user avatar
2 votes
1 answer
868 views

How can I detect double-encoded MySQL columns and rows, and validate the repair?

My database provider, bless their hearts, migrated our MySQL databases to another server recently, and introduced double-encoding of UTF-8 data via Latin1 into our text data. Strings like 'emdash—here'...
Jim DeLaHunt's user avatar
0 votes
1 answer
61 views

Synapse column store datetime encoding

I have a table in an Azure Synapse database. This table has a clustered columnstore index. It has a datetime column. The minimum value in this column is 2001-03-27 00:00:00 and the maximum is 2022-12-...
Michael Green's user avatar
0 votes
0 answers
73 views

Create dadabase with spesific encoding from shell script

I want to create a database from shell script, I add this line to my script psql -c 'CREATE DATABASE template1 WITH OWNER = postgres ENCODING = 'LATIN1' TABLESPACE = pg_default LC_COLLATE = "...
user3093583's user avatar
0 votes
1 answer
1k views

Import postgresql database with Latin encoding

I'm going to upgrade from postgresql 9 to postgresql 11, the encoding used is Latin. I've exported the database using this command pg_dumpall | gzip > /tmp/db.sql.gz I extracted the exported ...
Naruto Uzumaki's user avatar
1 vote
1 answer
1k views

Unknown charset: utf8mb4

Context: I send queries to my MariaDB server(Ver 15.1 Distrib 10.3.34-MariaDB) through a Python script and mysql.connector module. (I don't know which one it's among those 3 in my list: mysql-...
lyeaf's user avatar
  • 307

15 30 50 per page
1
2 3 4 5
10