Be more careful when trimming lines for display in the internal merge tool. Convert lines to UTF-8 for internal handling, and make sure not to display an invalid UTF-8 string.
Be more careful when trimming lines for display in the internal merge tool.
Convert lines to UTF-8 for internal handling, and make sure not to display
an invalid UTF-8 string.

We're still missing a way of determining the actual display width of
the string, i.e. the of equivalent of wcswidth(). However, not writing
invalid UTF-8 is already an improvement.

* subversion/svn/file-merge.c
  (prepare_line_for_display): When trimming lines, take care not to produce
   invalid UTF-8. Introduce local variable 'width' for clarity.
  (merge_chunks): Always convert lines to UTF-8 before display.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1357948 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion