View Issue Details

IDProjectCategoryView StatusLast Update
0024353mantisbtcode cleanuppublic2018-04-29 19:21
ReporterSL-Gundam Assigned 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