Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong strlen on mbstring overloaded environments #3

Closed
askainet opened this issue Jun 29, 2009 · 2 comments
Closed

Wrong strlen on mbstring overloaded environments #3

askainet opened this issue Jun 29, 2009 · 2 comments

Comments

@askainet
Copy link

When using charsets like UTF-8 and overloading mbstring functions

php.ini:
default_charset = "utf-8"
mbstring.func_overload=7
mbstring.internal_encoding=utf-8

strlen counts the number of complete characters, but we need the number of single bytes in order to tell the beanstalk server how much data we are going to send with the put command.

mb_strlen($data, "latin1") should be used to force counting single bytes on any environment.

@pda
Copy link
Collaborator

pda commented Aug 5, 2009

I've included your changes in the master.
Thanks!

@pda
Copy link
Collaborator

pda commented Aug 5, 2009

(Fixed by Ivan in 02fddf5)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants