View Issue Details

IDProjectCategoryView StatusLast Update
0024353mantisbtcode cleanuppublic2018-04-29 19:21
ReporterSL-GundamAssigned Toatrol 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.13.1 
Target Version2.13.2Fixed in Version2.13.2 
Summary0024353: mb_internal_encoding no longer being set because of removal utf8 library
Description

MantisBT team has made mbstring a requirement. This has resulted in the deletion of this utf-8 folder
https://github.com/mantisbt/mantisbt/tree/master-2.12/library/utf8
https://github.com/mantisbt/mantisbt/tree/master-2.13/library

I believe this has resulted in the loss of some important code since this line is now not being executed anywhere in MantisBT
https://github.com/mantisbt/mantisbt/blob/master-2.12/library/utf8/utf8.php#L41
This is resulting in MantisBT installations using other charsets for mbstring conversions

If MantisBT is setting the internal encoding charset differently these days i would really like to know so that i can adjust EmailReporting accordingly

Additional Information

https://mantisbt.org/forums/viewtopic.php?f=13&t=25515

TagsNo tags attached.

Activities

atrol

atrol

2018-04-24 14:35

developer   ~0059666

I think this explains it http://php.net/manual/en/ini.core.php#ini.default-charset
User Joterini who posted the issue in forum is using PHP 5.5.9.

So we have to reintroduce mb_internal_encoding('UTF-8'); at least as long as we support PHP 5.5.

atrol

atrol

2018-04-24 14:48

developer   ~0059667

PR https://github.com/mantisbt/mantisbt/pull/1343

SL-Gundam

SL-Gundam

2018-04-24 15:57

reporter   ~0059668

In my opinion longer since a default value does not guarantee that will actually be the value

On the other hand MantisBT requires UTF-8 without exception

atrol

atrol

2018-04-24 17:17

developer   ~0059669

You are right, change mode is PHP_INI_ALL, so the option can be set anywhere.

Another option could be to check the right setting just during installation and when running admin/check/index.php.
Not sure if it's worth the effort, as the call of mb_internal_encoding during runtime should be no big performance deal and is the safest way to fix it.

Related Changesets

MantisBT: master-2.13 4471fe41

2018-04-24 14:42:35

atrol

Details Diff
Set default encoding to UTF-8

Ensure that encoding is always set to UTF-8 independant from
any PHP default or ini setting

http://php.net/manual/en/ini.core.php#ini.default-charset

Fixes 0024353
Affected Issues
0024353
mod - core.php Diff File

Issue History

Date Modified Username Field Change
2018-04-24 13:58 SL-Gundam New Issue
2018-04-24 14:35 atrol Note Added: 0059666
2018-04-24 14:35 atrol Assigned To => atrol
2018-04-24 14:35 atrol Status new => assigned
2018-04-24 14:35 atrol Target Version => 2.13.2
2018-04-24 14:48 atrol Note Added: 0059667
2018-04-24 15:57 SL-Gundam Note Added: 0059668
2018-04-24 17:17 atrol Note Added: 0059669
2018-04-27 09:55 atrol Changeset attached => MantisBT master-2.13 4471fe41
2018-04-27 09:55 atrol Status assigned => resolved
2018-04-27 09:55 atrol Resolution open => fixed
2018-04-27 09:55 atrol Fixed in Version => 2.13.2
2018-04-29 19:21 vboctor Status resolved => closed