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

Resolve problem: illegal character in Tokenizer #1611

Closed
wants to merge 2 commits into from

Conversation

chybaDapi
Copy link

@chybaDapi chybaDapi commented Aug 15, 2017

When in file we have polish characters (eq: "Błąd") or Cyrillic, and we run Sniffer via PHPStorm IDE Sniffer will stop and we will get error:
iconv_strlen(): Detected an illegal character in input string in /vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php on line 193
This proposal will fix this issue.

When in file we have polish characters (eq: "Błąd") or Cyrillic, and we run Sniffer via PHPStorm IDE Sniffer will stop and we will get error: 
iconv_strlen(): Detected an illegal character in input string in /vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php on line 193
This proposal will fix this issue.
@mourawaldson
Copy link

Hey,
I've just noticed that on line 304 there's still a call for "iconv_strlen", besides there are 2 other places where a condition on function_exitsts is looking for iconv_strlen as well, I guess that should be changed as well.

@mourawaldson
Copy link

By the way, thanks for the initiative to fix this.

@Mopolo
Copy link

Mopolo commented Aug 30, 2017

Hi,

I have the same issue and this change resolves it for me.

@jougene
Copy link

jougene commented Oct 25, 2017

Please merge this issue to master. We all need it.

mb_strlen() has better support, so I think that checking if function exists can be omitted
@gsherwood
Copy link
Member

Please merge this issue to master. We all need it.

I am no going to merge in a change that modifies the PHPCS requirements so heavily.

I must have missed this PR, so I'm going to close it because this issue is not going to be fixed in this way.

@gsherwood gsherwood closed this Oct 29, 2017
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