-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
daff breaks horribly if file is not utf8 #71
Comments
Thanks for reporting this @SonOfLilit. For
You may need to change more if you want the diff itself to be produced in the same encoding rather than utf-8. How ideally should this work? A parameter specifying encoding? An attempt at autodetection? |
param should be best, can't rely on what the file says as you can have latin1 in a utf8 file 👎 I guess you could use auto-detection as a default, but will need something to be able to specify when things are crazy. |
Ideally there should be a cmd parameter because some poor people need to But more importantly, default behavior should be to work on raw, undecoded On Sat, Sep 17, 2016, 12:40 AM Carl Sutton notifications@github.com wrote:
|
Ok, sounds like a parameter is important since there'll always be those who need it. I'm not sure I can completely avoid touching cell contents. There are options for whitespace-insensitive and case-insensitive diffs for example. These obviously get wacky in the general case but people want them for the common special case of plain old ascii. Would auto-detection via delegation to eg chardet [1] in python be adequate do you think @SonOfLilit? |
As long as you're only touching characters that are ASCII (commas, double On Tue, Sep 20, 2016, 12:17 AM Paul Fitzpatrick notifications@github.com
|
On Windows, tried both with cmd and a git bash shell:
csv_windows-1255.zip
of course, the reason I care is that excel works notoriously badly with utf8 csvs, so my git repository is full of csvs in other encodings, and I can't convert them as part of
git diff
...P.S. does anyone here know why git would accept my
.gitattributes
entry for*.tsv
but would silently ignore the identical entry for*.csv
?The text was updated successfully, but these errors were encountered: