Answer the question
In order to leave comments, you need to log in
Problem with encoding in apache2 or mysql?
Good day.
There is a server on Ubuntu server 16.04
Installed Apache2, Mysql, Redmine
My task:
Get data from outside and transfer it to Redmine using a script written in python.
If the data is in English, there is no problem.
If it is in Cyrillic, then the word looks like this - test: {U+0442}{U+0435}{U+0441}{U+0442
} script), then everything is displayed as it should.
I looked into the redmine database, and saw the "wrong" Cyrillic alphabet is already being written there, i.e. something is not correctly transmitting data to the database, as I understand it.
The main question: Who is to blame for the "mangling" of the Cyrillic alphabet?
addition:
such a moment.
If I run my script with my hands, on the server side, then everything is written as it should be in Cyrillic.
And if the script starts automatically, after a certain condition is met, then there are "problems" with the Cyrillic alphabet.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
uh... if anyone has a similar situation, then... I do
n't know why, but s = subprocess.check_output(['svn', 'log', '-r', 'HEAD', '/reps_folder/rep/rep ']) this line when called "automatically" returns the text in ascii encoding, BUT if we return in xml format, i.e. s = subprocess.check_output(['svn', 'log', '--xml', '-r', 'HEAD', '/reps_folder/rep/rep']) then everything is fine with utf-8 encoding
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question