On 05.01.2019 17:53, Julian Foad wrote:
Stefan Kueng wrote:
When running blame on an utf16 text file, the lines can not be used
since the blame callback only passes a 'char *' parameter which means it
ends at the first zero char. But actually, svn knows if the line has
more content.

+1 on doing something to fix the problem.

Just briefly:
* we already have a (char*, len) wrapper, called svn_string_t, so I would 
expect it would be neatest to use that;

Ok, I'll change that and send a new patch.

* splitting the lines on a bare LF byte, and having a left-over zero byte, 
sounds just so wrong... it can't be right, can it? Can't we do something 
better? Use a callback for deciding how to split lines, or something? I haven't 
looked at the code, so not sure what exactly.

Well, without doing several checks for what kind of encoding the line has this won't be possible. I'm just glad that the function as is does not stop at the zero char but only on 'lf' - so even if the file is really binary it "works".

Stefan

Reply via email to