MantisBT does not accept some strings and throws error Incorrect string value

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
ntushar
Posts: 22
Joined: 07 Apr 2022, 06:49

MantisBT does not accept some strings and throws error Incorrect string value

Post by ntushar »

Hi,

We have mantisBT with version 2.25.5. For MantisBT database database character set is utf8mb4 .

Sometimes we get an error when we report issues. Below error is logged in error.log file

error: Incorrect string value: '\\xEF\\xBC\\x8C\\x0D\\x0A\\x0D’

So it appears that this ‘EF BC 8C ‘ string is not supported.

Can you please help to resolve this issue.
atrol
Site Admin
Posts: 8558
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: MantisBT does not accept some strings and throws error Incorrect string value

Post by atrol »

utf8mb4 is currently not fully supported, see https://www.mantisbt.org/bugs/view.php?id=20431
Please use Search before posting and read the Manual
ntushar
Posts: 22
Joined: 07 Apr 2022, 06:49

Re: MantisBT does not accept some strings and throws error Incorrect string value

Post by ntushar »

Hi,

Thanks for your response. If utf8mb4 is not fully supported than what would be the solution now. Should i change database character set to something else. If yes, what is the recommended database character set to change MantisBT database to.
atrol
Site Admin
Posts: 8558
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: MantisBT does not accept some strings and throws error Incorrect string value

Post by atrol »

You wrote it happens "sometimes".
Can you provide step by step instructions how to reproduce?

It could help to know which database and which PHP version you use.
Furthermore you should upgrade in a first step to current latest stable MantisBT version 2.25.7.

Maybe the issue is related to https://www.mantisbt.org/bugs/view.php?id=32385
If so, you could try a nightly build in a separate installation.
Please use Search before posting and read the Manual
ntushar
Posts: 22
Joined: 07 Apr 2022, 06:49

Re: MantisBT does not accept some strings and throws error Incorrect string value

Post by ntushar »

Hi,

Mysql version used is 8.0.33
PHP version used is 8.1.2

We received error "Internal application error" when updating an existing issue. In error logs the error was "error: Incorrect string value: '\\xEF\\xBC\\x8C\\x0D\\x0A\\x0D’ " .

The issue was with line as mentioned below.

Hello Jean-Luc,


When we convert this line to hexadecimal we get 20 20 48 65 6C 6C 6F 20 4A 65 61 6E 2D 4C 75 63 EF BC 8C

So it appears that this ‘EF BC 8C ‘ string is not supported by MantisBT.

Let me know if you need any other details.
atrol
Site Admin
Posts: 8558
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: MantisBT does not accept some strings and throws error Incorrect string value

Post by atrol »

I was not able to reproduce the issue using the given information.
TBH, I did not try to setup exactly the same (partially outdated) versions you are using. I don't have time for that.

Especially using PHP 8.1.2 is not a good choice, as meanwhile there is PHP 8.1.21 https://www.php.net/ChangeLog-8.php#PHP_8_1 where a lot of bugs are fixed since 8.1.2, also some related to multibyte characters.
Please use Search before posting and read the Manual
Post Reply