ericmckean / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

mbstring.func_overload can prevent strlen from returning a byte count. #132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Mark Reidenbach e-mailed this issue and the attached patches.

What steps will reproduce the problem?
1. In php.ini, set mbstring.func_overload to x such that x & 2 = 1. 
2. Minify a script with multibyte characters

JSMin will incorrectly count the bytes of the script (potentially 
introducing errors) and Minify will set an incorrect Content-Length 
header, breaking client display.

Original issue reported on code.google.com by mrclay....@gmail.com on 25 Aug 2009 at 9:43

Attachments:

GoogleCodeExporter commented 9 years ago
Original jsmin-php patch for future ref
http://github.com/rgrove/jsmin-php/commit/f89f32db50e943515c7361ebcfb6a2cacf7dc9
1a

Original comment by mrclay....@gmail.com on 21 Dec 2009 at 5:14

GoogleCodeExporter commented 9 years ago
Mark was using these settings:

default_charset = "UTF-8"
mbstring.internal_encoding = UTF-8
mbstring.func_overload = 7

and minifying the attached files

Original comment by mrclay....@gmail.com on 9 May 2010 at 3:49

Attachments:

GoogleCodeExporter commented 9 years ago
These issues should be fixed in 2.1.4

Original comment by mrclay....@gmail.com on 30 Sep 2010 at 4:36