New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
charset problem with Greek #1078
Comments
Can you fill out the questions from here: https://github.com/mailwatch/MailWatch/blob/1.2/.github/ISSUE_TEMPLATE.md |
Issue summary Steps to reproduce Expected result Actual result Installation
Reading the build script it fetches: https://dl.efa-project.org/build/3.0.2.6/MailWatch-develop-GIT-7f70aa3.zip Server configuration
Client configuration
|
Can you run |
MariaDB [mailscanner]> SHOW CREATE TABLE maillog \G |
Can you also post the raw subject from the mail headers? Eg. by showing the mails source code in your mail client |
This is from headers From DB: |
Can't reproduce with MariaDB 10.1.26, Debian 9, MW v1.2.7 or v1.2.9 , PHP 7.0.27 or 7.2 Are there any errors in the webserver log? |
no errors at all Maybe it's a combination with the php version. |
Don't know if it's related but after my proposed fix I had mysql log errors. Jun 27 17:30:26 mail2 MailScanner[9640]: Could not use Custom Function code MailScanner::CustomConfig::InitMailWatchLogging, it could not be "eval"ed. Make sure the module is correct with perl -wc (Error: DBD::mysql::st execute failed: Incorrect string value: '\xF0\x9F\x9A\xA7 \xCE...' for column 'subject' at row 1 at /usr/share/MailScanner/perl/custom/MailWatch.pm line 185, line 64. I'm reverting back my change to see how it goes with logging. |
It looks like an encoding problem. Maybe DBD::mysql is too old like in #779 |
On 28/06/18 00:28, Michael Pietsch wrote:
It looks like an encoding problem. Maybe DBD::mysql is too old like in
#779 <#779>
Can you post your DBD::mysql version as described here
https://docs.mailwatch.org/install/getting-started.html
4.013
Don't know if it's related also with Denial of Service error messages I
get like in #430
I'll upgrade tomorrow DBD::mysql and see how it goes.
thanks,
G
|
updating DBD::mysql to 4.046_01 fixed my problem with: Jun 27 17:30:26 mail2 MailScanner[9640]: Could not use Custom Function code MailScanner::CustomConfig::InitMailWatchLogging, it could not be "eval"ed. Make sure the module is correct with perl -wc (Error: DBD::mysql::st execute failed: Incorrect string value: '\xF0\x9F\x9A\xA7 \xCE...' for column 'subject' at row 1 at /usr/share/MailScanner/perl/custom/MailWatch.pm line 185, line 64. The subject had an emoticon that crashed the MailWatch SQL I've re-applied |
About the subject in status.php If I replace subject with same value as in headers then I see it normaly without SET NAMES |
As described in http://php.net/manual/en/mysqli.set-charset.php#121647 the set_charset function can fail with too old php versions. PR #1080 should fix this by checking its return code and calling the |
Nice catch! |
On 02/07/18 20:22, Michael Pietsch wrote:
As described in http://php.net/manual/en/mysqli.set-charset.php#121647 the set_charset function can fail with too old php versions. PR #1080 <#1080> should fix this by checking its return code and calling the |SET NAMES ...| query in case it failed
Verified,
thanks :)
G
|
Hi,
In status.php my greek characters (utf8) appear as questionmarks ??????? in subject.
Setting:
self::$link->set_charset($charset);
self::$link->query("SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci");
in database.php, solves my problem. I don't know the collation before 50503 to make a proper diff
but this works for me (self::$link->server_version 50505)
Check out:
http://php.net/manual/en/mysqli.set-charset.php#121067
http://php.net/manual/en/mysqli.set-charset.php#121647
Strange thing that in details.php (in specific message) subject appears correct...
regards,
Giannis
The text was updated successfully, but these errors were encountered: