You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2013/02/08 21:57:57 UTC

[tools] Interest in (or aversion to) adding CSV escaping to EscapeTool

All,

I'd like to use Velocity to produce CSV files and I have a routine I've
been using for years in automated reports to escape field values for
CSV. Any objections to adding it to EscapeTool?

Actually... StringEscapeUtils (from commons-lang, which does most of
EscapeTool's actual work) has an escapeCsv method already, though it
does scan every String twice for " and , characters, and it does not
handle leading and trailing whitespace (my code wraps such data in "s).

Any comments?

Thanks,
-chris


Re: [tools] Interest in (or aversion to) adding CSV escaping to EscapeTool

Posted by Nathan Bubna <nb...@gmail.com>.
Sounds good. Go for it! :)

On Fri, Feb 8, 2013 at 12:57 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> All,
>
> I'd like to use Velocity to produce CSV files and I have a routine I've
> been using for years in automated reports to escape field values for
> CSV. Any objections to adding it to EscapeTool?
>
> Actually... StringEscapeUtils (from commons-lang, which does most of
> EscapeTool's actual work) has an escapeCsv method already, though it
> does scan every String twice for " and , characters, and it does not
> handle leading and trailing whitespace (my code wraps such data in "s).
>
> Any comments?
>
> Thanks,
> -chris
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org