148: Diff creator and/or viewer not working on a utf-8 file

Ethan.******@gmai***** (Google Code) (Is this you? Claim this profile.)
Aug. 30, 2007
What's the URL of the page containing the problem?
http://reviewboard.eng.vmware.com/r/681/diff

What is the expected output? What do you see instead?
The diff for the file strings_ja.js is wrong. There are a couple problems:
1) The one line that it claims has changed has not actually changed. You
can see the same line on both sides of the diff.
2) The diff of this file ends abruptly before the end of the file
3) The one line that has been added is not shown.


One interesting thing that I just noticed: It claims that a line has been
added at line 242, which is actually correct! The one line that was added
to the actual file is line 242, so maybe the diff viewer is what is not
working properly?
david
#1 david
  • +Component-DiffViewer
chipx86
#2 chipx86
This looks fixed now with my latest change.

For the record, we were calling splitlines() on a string, and some Unicode characters
that are considered newlines (which we weren't treating as newlines elsewhere and
shouldn't have been) were being considered when splitting. We only wanted to consider
\n. This was causing the offsets to be wrong.
  • +Fixed