[Opensource] problem when saving string containing newline strings
Gabor Nagypal
nagypal at web.de
Tue Nov 11 04:16:10 PST 2003
Hi,
When I try to save a String to a DBObject toa VARCHAR field which
contains the newline character (\n) the newline character gets lost.
I.e., if dbo is a DBobject, and field is the name of the VARCHAR field:
String myString = "Test\nthis";
dbo.setStringFilter(field, FilterManager.RAW_FILTER);
dbo.setField(field, value);
result = dbo.getField(field);
result == "Testthis";
Interestingly, if I use LONGVARCHAR (which I map to PostgreSQL "text"
type) the phenomenon does not occur.
Does anyone else experience this? Is that a normal behaviour for VARCHARs?
Regards,
Gabor
P.S. I was somehow unsubscribed from the list, so I sis not get any
mails from the list. I noticed that fact only some days ago. If I have
some pending answers for someone, please notify me in a private mail.
More information about the Opensource
mailing list