Find the cause of the incorrect work of Python + MySQL with Cyrillic
Connecting the script to the BD
$host = ‘---’;
$db = ‘---’;
$user = ‘----’;
$password = ‘----’;
$charset = ‘utf8’
$dsn = “mysql:host=$host;dbname=$db;charset=$charset”;
$opt = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => “SET NAMES utf8”,
and the
The problem is that another script written on Python, working on version 2.7, cannot process the Cyrillic (experienced way it was established that with Latin everything works correctly) Before that same script (where that 10 months ago the data was filled and the script written on Python worked correctly with the data from the mysql table including the Cyrillic.This Python script also works with the old copy of this table:
He tried to change the python connector to mysql c pymsql to mysql connector from Oracle and updated Python c version 2.7.17 to 2.7.18 - the result is the same: with the old copy of the table works correctly, with the new - no.The problem is either in the data stored or in the database.It is necessary to identify, fix and describe what the problem was and how it was eliminated.
-
I know what the reason and I will quickly fix it.
I explain what was the reason.
Go to turn!
-
1479 72 0 I can solve the problem quickly and efficiently. Write and communicate
-
322 1 0 Hello, I myself faced the same problem, write me in personal messages, I'll show you how to fix it. It’s likely to be decided in a few minutes or even seconds if you’re lucky.
-
453 5 0 Good morning, let’s try to understand what’s wrong with the script.
-
1442 16 0 Write to Ls, I'll explain the problem. I already understand what...
Current freelance projects in the category Databases & SQL
Work with BAS CORPHello! Currently, the following tasks need to be completed: Adjustment of the printed form in BAS KORP according to the client's parameters. Specifically, the task is not to display certain fields. Updating the classifier of professions in BAS KORP for a number of… Payment Systems Integration, Databases & SQL ∙ 10 minutes back ∙ 1 proposal |
Need a 1C specialist for refinements and development.I am looking for a 1C specialist for freelance collaboration. I am currently working with a contractor who provides support and maintenance for the 1C system. However, due to the contractor's workload, there is a need for prompt execution of additional tasks, improvements, and… Databases & SQL ∙ 1 day 6 hours back ∙ 10 proposals |
Restoring Instagram after a banOn March 3, 2026, my Instagram was blocked due to a violation of rules. I believe there has been some mistake, as the page was personal with photos and videos of my personal trips. I did not post any comments anywhere. I have sent several appeals. I cannot download my files… Databases & SQL, Web Programming ∙ 1 day 17 hours back ∙ 4 proposals |
Eliminate the issue of incomplete data import from Excel files of Nova Poshta specifications into 1C:
45 USD
Goal: There is a processing in 1C for uploading the specifications of Nova Poshta. For unclear reasons, it has stopped loading some tabular data. We need to find the reason and eliminate the problem of incomplete data import from Excel files of Nova Poshta specifications into… System & Network Administration, Databases & SQL ∙ 5 days back ∙ 16 proposals |
Accounting, planning, and sales system for a mushroom farm
603 USD
Here is the complete, final text of the Technical Assignment (TA). It combines all your requirements: 16 chambers, 20 contractors, a schedule by days, accounting for containers, profitability calculation, and a mandatory division into three grades of mushrooms. You can fully… Databases & SQL, Client Management & CRM ∙ 7 days 4 hours back ∙ 59 proposals |