I tried to reproduce this with no success. Can you post the exact strings
you are trying to diff with HtmlTestFixture.java ?
Also you could always do some pre-preprocessing before passing the input
strings to DaisyDiff. I am actually using : input =
input.replaceAll(" "," "); in production code. Maybe this might solve
your problem as well.
3 points.
1. I tried your example with HtmlTestFixture and got normal spaces (not
nsbp but not strange characters either).
2. The HtmlTestFixture is very simple (just for unit tests). For production
quality code I would advise you to look at the main method that performs
several other cleanups. Normal DaisyDiff does exactly what you want (see
attached screenshot)
3. Can you clarify what data is lost by the "replaceAll" method? In your
example if I run this method then I still have the information that 3
spaces exist before newline. What data is lost? What is the difference
if the text is in quotes or not?
Attachments:
nbsp.png 77.2 KB
I really dont understand how this is working at you end..could be a JVM
issue?
May be I could try some other code as you suggested..
What I meant by you cant use input.replaceAll(" "," ") can be
explained by viewing the below code in a browser.
<p>hello how are you</p>
<p>hello how are you</p>
The output will be the same.
I had the same issue with the
In my case, htmldiff was replacing the correctly to ' ', in UTF-8.
On the other hand, my browser was configured to char encoding != UTF-8.
Solution: configure your browser char encoding to UTF-8.
dominic, can you check your browser settings?
Maybe what mcdoctore is suggesting is a solution?
It is working now..Thanks
Comment #8 on issue 25 by kkapelon: The HtmlDiffer comparison does not work
well with
http://code.google.com/p/daisydiff/issues/detail?id=25
Closed since it was apparently a browser issue.