You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.
Hi guys, when Grit tries to get diffs, and name of files in diffs contains ascii incompatible string like CJK, it would give some unexpected string, like what I did in this test .
Basically a_path/b_path will looks like "\\344\\270\\255\\346\\226\\207.txt", rather than "\344\270\255\346\226\207.txt", single backslash is convertible, double backslashes is not, Ruby consider double backslashes as escaped.
I am thinking of
$SAFE =4eval%Q{"#{a_path}"}
like code with safe protecting to eval this string, but I don't think it's the best solution, I don't even think this is a way of solving double backslashes, do you guys have any good ideas? Please check the test to reproduce this problem. Thanks.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi guys, when Grit tries to get diffs, and name of files in diffs contains ascii incompatible string like CJK, it would give some unexpected string, like what I did in this test .
Basically a_path/b_path will looks like
"\\344\\270\\255\\346\\226\\207.txt"
, rather than"\344\270\255\346\226\207.txt"
, single backslash is convertible, double backslashes is not, Ruby consider double backslashes as escaped.I am thinking of
like code with safe protecting to eval this string, but I don't think it's the best solution, I don't even think this is a way of solving double backslashes, do you guys have any good ideas? Please check the test to reproduce this problem. Thanks.
The text was updated successfully, but these errors were encountered: