From: Rob V. <rv...@do...> - 2010-02-12 13:30:45
|
Aleksandr I have confirmed that your fix does appear to work with some unit tests of my own. This bug also uncovered some bugs in the Turtle & N3 tokenisers handling of escapes and long literals which I am now fixing (most of the fixes are already committed) Thanks again, Rob Vesse From: Rob Vesse [mailto:rv...@do...] Sent: 12 February 2010 09:34 To: 'dotNetRDF Bug Report tracking and resolution' Cc: za...@tp... Subject: Re: [dotNetRDF-bugs] Chars escaping bug Hi Aleksandr You are probably right about that, do you have some test cases I can use to confirm that your fix works as expected? Thanks, Rob Vesse From: Aleksandr A. Zaripov [mailto:za...@tp...] Sent: 12 February 2010 08:00 To: dot...@li... Subject: [dotNetRDF-bugs] Chars escaping bug Hello There are bug with literal nodes, which contain multiline strings (eg. "\r\n"). The code in BaseWriterContext class (lines 391-394) does not works correctly. The string if (value.Contains("\\n")) value = value.Replace("\\n", "\\\\n"); should be if (value.Contains("\"")) value = value.Replace("\"", "\\\""); but I think that the more universal solution is value.Replace("\\", "\\\\"); С уважением, Зарипов Александр za...@tp... |