[Tickets #7959] Re: Patch to make File_PDF work with mbstring.func_overload

bugs at horde.org bugs at horde.org
Fri Feb 6 18:17:22 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7959
------------------------------------------------------------------------------
  Ticket             | 7959
  Updated By         | mike at silverorange.com
  Summary            | Patch to make File_PDF work with mbstring.func_overload
  Queue              | Horde Framework Packages
  Version            | FRAMEWORK_3
  Type               | Bug
  State              | Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


mike at silverorange.com (2009-02-06 13:17) wrote:

The mbstring extension allows working with multi-byte string  
encodings. Pragmatically, using mbstring.func_overloading is the best  
way to develop a UTF-8 application in PHP.

When mbstring.func_overloading is enabled, the string functions treat  
strings a sequence of characters, not bytes. Usually, this is desired,  
as you wouldn't want to truncate a string part way through a  
multi-byte character.

When this is not desired is when you are working with binary files or  
streams. Usually in this case you want to work with bytes and not  
characters. The attached patch explicitly uses bytes (the '8bit'  
encoding) for string calculations in a binary context if mbstring  
function overloading is enabled.






More information about the bugs mailing list