ERROR"6944

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
KooiInc
New user
New user
Posts: 5
Joined: 2015-03-25 20:12

ERROR"6944

Post by KooiInc » 2015-03-25 20:20

This ERROR" 6944 is bothering me for quite some time now. I can't think of a way to resolve it. Maybe one of you knows it? The error occurs over and over again for the same sender addres. Here's an entry from the error log (whitespace added for readability):

Code: Select all

 Source: DALConnection::Execute, 
 Description: MySQL: Incorrect string value: '\xF0\x9F\x94\x8C S...' for column 'metadata_subject' 
               at row 1 
 (Additional info: 
  INSERT INTO hm_message_metadata 
   (metadata_accountid, metadata_folderid, metadata_messageid, 
    metadata_dateutc, metadata_from, metadata_subject,   metadata_to, metadata_cc) 
   VALUES (49, 778, 210869, '2015-03-24 13:56:45', 
           '"Consumentenbond Energiecollectief" <energiecollectief@consumentenbond.nl>')
I am using version 5.6.1-B2208, MySQL server version 5.6.14.

Thanks in advance,

Renzo Kooi

Addendum: changing the collation for [hm_message_metadata].[metadata_subject] to utf-16 - default collation seems to solve the problem for now. If it returns I'll keep you informed, if not - that's a solution.

User avatar
SorenR
Senior user
Senior user
Posts: 3420
Joined: 2006-08-21 15:38
Location: Denmark

Re: ERROR"6944

Post by SorenR » 2015-03-25 23:11

KooiInc wrote:This ERROR" 6944 is bothering me for quite some time now. I can't think of a way to resolve it. Maybe one of you knows it? The error occurs over and over again for the same sender addres. Here's an entry from the error log (whitespace added for readability):

Code: Select all

 Source: DALConnection::Execute, 
 Description: MySQL: Incorrect string value: '\xF0\x9F\x94\x8C S...' for column 'metadata_subject' 
               at row 1 
 (Additional info: 
  INSERT INTO hm_message_metadata 
   (metadata_accountid, metadata_folderid, metadata_messageid, 
    metadata_dateutc, metadata_from, metadata_subject,   metadata_to, metadata_cc) 
   VALUES (49, 778, 210869, '2015-03-24 13:56:45', 
           '"Consumentenbond Energiecollectief" <energiecollectief@consumentenbond.nl>')
I am using version 5.6.1-B2208, MySQL server version 5.6.14.

Thanks in advance,

Renzo Kooi

Addendum: changing the collation for [hm_message_metadata].[metadata_subject] to utf-16 - default collation seems to solve the problem for now. If it returns I'll keep you informed, if not - that's a solution.
You need to change it to "utf8mb4" to support 4 byte UTF8. utf8mb4 is a superset of utf8.

Reference info:
4 byte UTF8 is supported in MySQL 5.5.3 or later ** AND ** hMailServer Version 5.5 - Build 2074 or later.
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

KooiInc
New user
New user
Posts: 5
Joined: 2015-03-25 20:12

Re: ERROR"6944

Post by KooiInc » 2015-03-26 11:21

Hi Søren,

thanks for your answer. Utf16 also worked, but I changed it to utf8mb4 for the whole table ([hm_message_metadata].[metadata_subject]) indeed.

Regards / Renzo Kooi

User avatar
SorenR
Senior user
Senior user
Posts: 3420
Joined: 2006-08-21 15:38
Location: Denmark

Re: ERROR"6944

Post by SorenR » 2015-03-26 13:51

KooiInc wrote:Hi Søren,

thanks for your answer. Utf16 also worked, but I changed it to utf8mb4 for the whole table ([hm_message_metadata].[metadata_subject]) indeed.

Regards / Renzo Kooi
"utf16" may do the trick table wise, but it's only half a solution. The database read/write code in hMailServer will only check for "utf8" and "utf8mb4" based charactersets, so choosing a different characterset may (or may not) generate other problems.

In theory it should be sufficient to change [metadata_subject] only, however [to], [from] and [cc] could also contain 4 byte UTF8 characters AKA Emoji's.

Another concern about the change from "utf8" (3 byte) to "utf8mb4" (4 byte) is the field length.

Quite likely you had VARCHAR(255) which takes 767 bytes in utf8 (3*255+2; the "2" is the size of the length field). The equivalent in the 4-byte utf8mb4 would be (191) (4*191+2=766; not room for more than 191).
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

KooiInc
New user
New user
Posts: 5
Joined: 2015-03-25 20:12

Re: ERROR"6944

Post by KooiInc » 2015-03-27 17:18

Thnaks again Søren. What can I do to circumvent the field length problem then? Enlarge the varchar field (I'd say VARCHAR(340) (255/191 * 255) to create room for 255 characters)?

User avatar
SorenR
Senior user
Senior user
Posts: 3420
Joined: 2006-08-21 15:38
Location: Denmark

Re: ERROR"6944

Post by SorenR » 2015-03-27 18:56

KooiInc wrote:Thnaks again Søren. What can I do to circumvent the field length problem then? Enlarge the varchar field (I'd say VARCHAR(340) (255/191 * 255) to create room for 255 characters)?
How long subjects do you accept ??

In my world anything above 20-40 characters is SPAM ;-)
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

KooiInc
New user
New user
Posts: 5
Joined: 2015-03-25 20:12

Re: ERROR"6944

Post by KooiInc » 2015-03-29 15:23

Sure, but I beg to differ :?. Have you ever used e-mail notification from Trello? Example subject from Trello: [Name obfuscated] removed you from the card Voorbereiden implementatie afschaffen loting en gebruikersdocumentatie decentrale selectie on 1. Input voor Backlog at 2:23 PM on Nov 6, 2014 (183 characters).

User avatar
SorenR
Senior user
Senior user
Posts: 3420
Joined: 2006-08-21 15:38
Location: Denmark

Re: ERROR"6944

Post by SorenR » 2015-03-29 16:54

KooiInc wrote:Sure, but I beg to differ :?. Have you ever used e-mail notification from Trello? Example subject from Trello: [Name obfuscated] removed you from the card Voorbereiden implementatie afschaffen loting en gebruikersdocumentatie decentrale selectie on 1. Input voor Backlog at 2:23 PM on Nov 6, 2014 (183 characters).
Well, if you really want to know...

RFC 2822, section 2.1.1.
There are two limits that this standard places on the number of characters in a line. Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.
The 78 characters thing is called "Folding"

RFC 5322, 3.6.5. Informational Fields
The "Subject:" field is the most common and contains a short string identifying the topic of the message.
:mrgreen:

Anyways, it appears that Trello have roots in the mobile data world. They use the Subject: field like an SMS :roll:

And by the way... The SMS (mobile Text) was NEVER intended to be real-time. It was a service that was offered to some subscribers (not all) and it would utilize "unused" computer time in the network.
Now it's the other way around. If it takes more than 0.1 second to deliver, the sender will send a new SMS asking if "you got the first one?"... :roll: and when you speak on the phone, you talk to the voicemail ... :|
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

Post Reply