Coder Social home page Coder Social logo

Error since last pull about icdiff HOT 14 CLOSED

Spope avatar Spope commented on July 18, 2024
Error since last pull

from icdiff.

Comments (14)

jeffkaufman avatar jeffkaufman commented on July 18, 2024

what version are you on? ./icdiff --version

from icdiff.

Spope avatar Spope commented on July 18, 2024

the last one : icdiff version 1.6.4

from icdiff.

jeffkaufman avatar jeffkaufman commented on July 18, 2024

What files are you diffing?

Are you using python2 or python3?

from icdiff.

Spope avatar Spope commented on July 18, 2024

I use Python 2.7.6 and I diff .php files that were correctly diffed last friday

from icdiff.

jeffkaufman avatar jeffkaufman commented on July 18, 2024

icdiff has new output handling to deal with #31. Reverting to the old handling would break that case, so I need to figure out how to reproduce this case so I make both work. Are these php files you can post? Or could you zip them and send them to [email protected]?

from icdiff.

Spope avatar Spope commented on July 18, 2024

I tried to manually diff my php files and it works, it only fail if I use svn diff.
And sorry I can't send you those files (DMCA)

from icdiff.

jeffkaufman avatar jeffkaufman commented on July 18, 2024

I got svn set up, checked out an svn repo, appended 测试行abc测试测试行abc测试测试行abc测试测试行abc测试测试行abc测试测试行abc测试测试行abc测试测试行abc测试测试行abc测试 to one of the files, ran svn diff --diff-cmd icdiff and it worked as expected:

svn co http://plugins.svn.wordpress.org/calculated-fields-form/trunk calculated-fields-form/
cd calculated-fields-form/
cat /path/to/icdiff/tests/input-1.txt  >> cp_calculatedfieldsf_admin_int.php
svn diff --diff-cmd icdiff

screen shot 2014-12-15 at 10 52 13 am

Could you try this as well? Either it won't work on your machine and then it's something about icdiff operating in different environments, or it will work in which case it's something about the specific encoded characters in your php file.

from icdiff.

Spope avatar Spope commented on July 18, 2024

Ok, I got the exact same error, but I also tried to add a single letter or a single space and it throw the error to. Each svn diff will throw this error.

Index: cp_calculatedfieldsf_admin_int.php

Traceback (most recent call last):
  File "/bin/icdiff", line 561, in <module>
    start()
  File "/bin/icdiff", line 476, in start
    diff_files(options, a, b, options.encoding)
  File "/bin/icdiff", line 556, in diff_files
    codec_print(line, options)
  File "/bin/icdiff", line 483, in codec_print
    sys.stdout.write(s.encode(options.output_encoding))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 44: ordinal not in range(128)

from icdiff.

jeffkaufman avatar jeffkaufman commented on July 18, 2024

Thanks!

What os are you on? What kind of terminal? What does echo $LANG give you?

from icdiff.

Spope avatar Spope commented on July 18, 2024

ubuntu 14.04, default terminal and fr_FR.UTF-8.
My svn conf is default too, except for diff-cmd : diff-cmd=icdiff

from icdiff.

jeffkaufman avatar jeffkaufman commented on July 18, 2024

I just tried setting LANG=fr_FR.UTF-8 on a ubuntu 14.04 box, and didn't get this error. But I'm not confident I'm setting the locale correctly.

Are you saying you're seeing this error with every use of icdiff with svn, even ones that don't have any characters outside of the ascii range?

Could you try using python3?

from icdiff.

Spope avatar Spope commented on July 18, 2024

Yes I have the error even with ascii character.
Same thing with python 3
(I have created an alias python=python3 into my bashrc, which give me Python 3.4.0)

from icdiff.

jeffkaufman avatar jeffkaufman commented on July 18, 2024

Setting python=python3 in your bashrc won't make icdiff use python3. The easiest way to do that would be to change #!/usr/bin/env python to #!/usr/bin/env python3 at the top of icdiff.

from icdiff.

Spope avatar Spope commented on July 18, 2024

Okay, with python3 it works.

from icdiff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.