On 4/26/2004 12:58 PM, Eric Noriega wrote:
> Does the database contains the CR/LF characters, or is it possible
> that the data was entered with the literal '0d 0a' string. You are
> correct that these CR/LF are hex equivalent to 0d/0a. What DB are you
> using?
>
> Eric Noel wrote:
>
>> I had problems with data fetched from db where it contains 0d 0a
>> character ( it think its a carriage return). so i try doing the
>> following to remove them.( btw, im using jsp 2.0). but its seems its not
>> removing them? any help will be appreciated.
>>
>> <c:set var="varTmp" value="${rsList.rows[0].entry_content}"/>
>>
>> <%-- Trim --%>
>> <c:set var="varTmp" value="${fn:trim(varTmp)}" />
>>
>> <%-- Convert all types of single quotes --%>
>> <c:set var="varTmp" value="${fn:replace(varTmp,'`','\\'')}" />
>> <c:set var="varTmp" value="${fn:replace(varTmp,'’','\\'')}" />
>> <c:set var="varTmp" value="${fn:replace(varTmp,'\\'',''')}" />
>>
>> <%-- Convert all types of double quotes --%>
>> <c:set var="varTmp" value="${fn:replace(varTmp,'“','\"')}" />
>> <c:set var="varTmp" value="${fn:replace(varTmp,'”','\"')}" />
>>
>> <%-- Replace 0d 0a carriage returns & line feeds --%>
>> <c:set var="varTmp" value="${fn:replace(varTmp,'\\\r',' ')}" />
>> <c:set var="varTmp" value="${fn:replace(varTmp,'\\\n',' ')}" />
>> <c:set var="varTmp" value="${fn:replace(varTmp,'\\\r\\\n','')}" />
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
>> For additional commands, e-mail: tomcat-user-help@(protected)
>>
>> ===========================================================================
>>
>>
>> To unsubscribe: mailto listserv@(protected)
>> JSP-INTEREST".
>> For digest: mailto listserv@(protected)
>> DIGEST".
>>
>> Some relevant archives, FAQs and Forums on JSPs can be found at:
>>
>> http://java.sun.com/products/jsp
>> http://archives.java.sun.com/jsp-interest.html
>> http://forums.java.sun.com
>> http://www.jspinsider.com
>
>
> ===========================================================================
> To unsubscribe: mailto listserv@(protected)
> JSP-INTEREST".
> For digest: mailto listserv@(protected)
> DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
> http://java.sun.com/products/jsp
> http://archives.java.sun.com/jsp-interest.html
> http://forums.java.sun.com
> http://www.jspinsider.com
>
it is mysql, data were imported from access
===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com