Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Process] Non ASCII characters disappearing during the escapeshellarg#21485
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
If the LC_CTYPE is not set at UTF-8, the escapeshellarg() function will remove every non-ascii characters.As it's usual in europe to have directories with non-ascii chars in their name (ex : ~/Vidéos) the function should throw an exception if we're trying to submit it an argument containing non-ascii param and the LC_CTYPE is not set to use UTF-8
nicolas-grekas commentedFeb 1, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
what about doing escaping ourselves instead? |
…n/symfony into escapeargumentfix
GuillaumeVerdon commentedFeb 1, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I edited the current test case and the logic for Linux, as I don't know how the function is working on windows I didn't patch it. ProcessUtilsTest.php is passing on my environment |
nicolas-grekas commentedFeb 1, 2017
👍 (to be merged on 2.7, Windows is unaffected) |
nicolas-grekas commentedFeb 2, 2017
Thank you@GuillaumeVerdon. |
…apeshellarg (GuillaumeVerdon)This PR was submitted for the 3.2 branch but it was merged into the 2.7 branch instead (closes#21485).Discussion----------[Process] Non ASCII characters disappearing during the escapeshellargIf the LC_CTYPE is not set at UTF-8, the escapeshellarg() function will remove every non-ascii characters.As it's usual in europe to have directories with non-ascii chars in their name (ex : ~/Vidéos) the function should throw an exception if we're trying to submit it an argument containing non-ascii param and the LC_CTYPE is not set to use UTF-8| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? || Fixed tickets || License | MIT| Doc PR |I had this issue while using the lib ffmpeg and giving it a path like "~/Vidéos" the "é" chars was disappearing from the command giving a RuntimeException.The problem was my LC_CTYPE that wasn't set properly, I believe an exception should be raised before the RuntimeException to warn the user of that behaviorCommits-------3779f3f [Process] Non ASCII characters disappearing during the escapeshellarg
Uh oh!
There was an error while loading.Please reload this page.
If the LC_CTYPE is not set at UTF-8, the escapeshellarg() function will remove every non-ascii characters.
As it's usual in europe to have directories with non-ascii chars in their name (ex : ~/Vidéos) the function should throw an exception if we're trying to submit it an argument containing non-ascii param and the LC_CTYPE is not set to use UTF-8
I had this issue while using the lib ffmpeg and giving it a path like "~/Vidéos" the "é" chars was disappearing from the command giving a RuntimeException.
The problem was my LC_CTYPE that wasn't set properly, I believe an exception should be raised before the RuntimeException to warn the user of that behavior