7.x: (Mantis) "#1366: Incorrect string value" error
Posted by Aleksandr Alekseev on 17 July 2012 07:47
When I use Mantis send method - I get error "#1366: Incorrect string value: '\xE6\x87\xA9\xEF\xA0\xA7...' > for column 'additional_information'".
This error means that inserted string contains unsupported characters for column. This usually means encoding problem. I.e. encoding for column or table can not hold inserted string values, because string contains characters outside of encoding range.
EurekaLog 7 uses Mantis SOAP API. EurekaLog doesn't perform DB actions directly - it just calls API functions and pass strings. All strings for SOAP are encoded in UTF-8. Transforming SOAP calls to DB access is performed by Mantis.Therefore, this is not EurekaLog error. This is a problem in Mantis configuration.
A). Fix Mantis encoding configuration. Does your database use UTF-8? What about tables and columns? What about Mantis connection to DB? Is it UTF-8? Please, refer to Mantis documentation and support.
B). Uncheck "Append logs" option in EurekaLog configuration for Mantis. This will disable sending bug report as text to Additional information column.
C). Replace full bug report with minimal useful information (e.g. call stack). You can do this with the following code:
implementation uses EConsts, ESend, ESendAPIMantis; type TELTrackerMantisSender = class(ESendAPIMantis.TELTrackerMantisSender) protected function GetMessage: String; override; end; function TELTrackerMantisSender.GetMessage: String; var Msg: String; begin Msg := '%' + EEnvExceptCallStack + '%'; Msg := ExpandEnvVars(Msg); Result := Trim(Msg); end; initialization RegisterSenderFirst(TELTrackerMantisSender); end.
Note: "Append logs" option must be enabled.