MySQL regexp_replace()
2023-01-24 (Tuesday)
Capture groups in the replacement string are denoted as $n.
Capture groups in the replacement string are denoted as $n.
Database PyPI Debian Ubuntu import Rows as named tuples PostgreSQL psycopg import psycopg import psycopg.rows csr = db.cursor(row_factory=psycopg.rows.namedtuple_row) MySQL/MariaDB mysqlclient python3-mysqldb python3-mysqldb import MySQLdb MySQL/MariaDB mysql-connector n/a python3-mysql.connector import mysql.connector csr = db.cursor(named_tuple=True)
DBI->connect(..., {mysql_enable_utf8 => 1}) converts MySQL varchar columns to Perl character strings (i.e. an ‘ß’ shows up as “\x{DF}”, a ‘€’ as “\x{20ac}”, etc.) But DBI->connect(..., {mysql_enable_utf8mb4 => 1})converts to Windows-1252 first, so the ‘€’ shows up as “\x{80}”. This also happens if you combine both.