Re: [LANG] StringUtils.unescapeCsv() allows unpaired embedded double-quote

2008-11-05 Thread sebb
Because the rule is that embedded double-quotes should be doubled. This is essential when unescaping a CSV list. For example, suppose one needs to escape the two fields: abcd","efgh zyx This is encoded as "abcd"",""efgh",xyz This allows the individual fields to be recovered correctly, as the u

Re: [LANG] StringUtils.unescapeCsv() allows unpaired embedded double-quote

2008-11-04 Thread Viraj Turakhia
Just curious, why is this not the right behaviour? -v On Tue, Nov 4, 2008 at 8:35 PM, sebb <[EMAIL PROTECTED]> wrote: > Just happened to notice that StringUtils.unescapeCsv() does not check > that embedded double-quotes occur in pairs. > > Should this condition be detected, and if so, what shou

[LANG] StringUtils.unescapeCsv() allows unpaired embedded double-quote

2008-11-04 Thread sebb
Just happened to notice that StringUtils.unescapeCsv() does not check that embedded double-quotes occur in pairs. Should this condition be detected, and if so, what should happen? Throw an Exception? Return the original string untranslated? Just document the behaviour? At present the string <"foo