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

Consider UTF-8 as the default encoding #760

Closed
item4 opened this issue Nov 4, 2015 · 6 comments
Closed

Consider UTF-8 as the default encoding #760

item4 opened this issue Nov 4, 2015 · 6 comments
Milestone

Comments

@item4
Copy link

item4 commented Nov 4, 2015

I heared some incomprehensible feature about phpcs.

I'm Korean and I can write source with korean.

But, We(=Korean) must use phpcs with --endoing=utf-8 option. If we didn't, we encountered some message like "line is too long".

I think default encoding must be utf-8. Some RDF about PHP 7 features say "UTF-8 is now the de facto standard encoding for PHP"

How do you think about change default encoding?

@aik099
Copy link
Contributor

aik099 commented Nov 4, 2015

For historical reasons only I guess. Changing default encoding in feature release would be considered as BC break for people that rely on fact, that default encoding isn't UTF-8.

In 3.0 release I guess it's possible to change default encoding value.

For now I recommend you:

  • if you're using custom standard, then add <arg name="encoding" value="utf-8"/> to it
  • if you're using built-in standard, then create phpcs.xml file with basically same content (of course add root node around it)

@gsherwood
Copy link
Member

I am considering it as the default for 3.0, but I can't make a big BC break like that in 2.0. It also requires a PHP extension that is not universally installed, so I have to check for that as well.

@item4
Copy link
Author

item4 commented Nov 11, 2015

@gsherwood Can you add milestone to it for don't forget?

@gsherwood gsherwood added this to the 3.0 milestone Nov 11, 2015
@gsherwood gsherwood reopened this Nov 11, 2015
@gsherwood gsherwood changed the title Question: Why default encoding is not utf-8? Consider UTF-8 as the default encoding Nov 11, 2015
@barbu110
Copy link

Anything on this yet?

@gsherwood
Copy link
Member

Anything on this yet?

My last comment is still the current status.

@gsherwood
Copy link
Member

This is now done in the 3.0 branch. The iconv functions will be used by default as long as that extension has not been disabled.

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

No branches or pull requests

4 participants