It seems like this problem with $strings.chop($index,1) in
templates/sql/base/postgresql/table.vm on Windows can be fixed if you do one
of two things:

- convert the offending template (index.vm) to have DOS newline conventions
(\r\n instead of \n)

- replace velocity-1.3-dev.jar with velocity-1.3-rc1.jar

my guess is that StringUtils.chop in velocity-1.3-dev.jar handles
cross-platform newline conventions badly--like, trying to chop off two
characters on Windows when it sees the last character to be chopped is \n,
without checking to make sure the preceding \r is really there.
velocity-1.3-rc1.jar does the right thing and literally chops off one
character unless your platform has two-character newlines AND the full
two-character newline is there.

(IMO, it would be nice to treat all platforms' newline characters in the
template as a single character, regardless of what platform you're running
Velocity on -- so if I'm running on UNIX, using a DOS-convention template,
$strings.chop($foo, 1) should chop off \r\n rather than leaving the \r
behind.  That's a topic for the Velocity list though. :-))

-- Bill



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to