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

mbstring use UTF-8 #22

Merged
merged 1 commit into from
Mar 26, 2012
Merged

mbstring use UTF-8 #22

merged 1 commit into from
Mar 26, 2012

Conversation

slumbers99
Copy link
Contributor

Character encoding is UTF-8 used in mbstring recently. I want to change the default values ​​from EUC-JP.

@yohgaki
Copy link
Contributor

yohgaki commented Mar 26, 2012

We are taking about the default (including hard coded one) php.ini settings in the internal list. What is the conclusion?

I think changes are mostly good, except mbstring.encoding_translation should be "Off". I prefer substitution to none, since we don't have give attackers to clue what is going on.

@chobie
Copy link

chobie commented Mar 26, 2012

+1

In my humble opinion:
Actually, almost Japanese developers choses UTF-8 encoding as far as I know.
this patch would be helpful for new comer and experts. as It just comment out, then works fine!

this settings comes from Hiroshi Tokumaru's article:
http://www.tokumaru.org/d/20100927.html

It will prevent some security issues which is caused by character encoding.

I think changes are mostly good, except mbstring.encoding_translation should be "Off". I prefer substitution to none, since we don't have give attackers to clue what is going on.

I agree @yohgaki 's opinion.

@php-pulls php-pulls merged commit 833dcf3 into php:master Mar 26, 2012
@yohgaki
Copy link
Contributor

yohgaki commented Mar 27, 2012

In old days, some browsers couldn't handle char encoding right and there were some cases automatic encoding translation is useful. I think PHP shouldn't convert input encoding automatically, now a days.

There is both pros and cons for translating invalid char to NULL or any other actual chars. When this setting is introduced, we agreed to set this to none. i.e. remove invalid parts of strings I prefer not to convert invalid chars to '?' which may have some meaning in certain string.

Anyway, changes are already committed to master.

@nikic
Copy link
Member

nikic commented Mar 27, 2012

Just to be sure I got this right: This only changes the comments in the php.ini example files, so the PHP defaults didn't actually change. Right?

@slumbers99
Copy link
Contributor Author

Most of all my suggest is php.ini sample want be new settings.
So, Default value that php has won't be change. It will be O.K.

Thank you for merging my request.

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

Successfully merging this pull request may close these issues.

5 participants