• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Frontbase CLOB newline problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frontbase CLOB newline problem


  • Subject: Re: Frontbase CLOB newline problem
  • From: Awbrey Hughlett <email@hidden>
  • Date: Wed, 12 Nov 2008 00:16:46 -0600


On Nov 11, 2008, at 11:46 PM, Chuck Hill wrote:


On Nov 11, 2008, at 3:39 PM, Awbrey Hughlett wrote:

I am trying to print out a text document with data from a CLOB in Frontbase.

Print out, as in to an HTML page?


No, I am printing it out to a text document available for download as in example.txt and I don't want any line breaks in the document. I want the special characters to be present though. I know how to write the special characters to the document with "\\n" where it explicitly prints the \ character plus an 'n'.


In my code, I get the data and set it to a string value. What I want to do is get rid of all line breaks and carriage returns.

Get rid of them or show them as something else or convert them to HTML line breaks?



So here is what I have tried and the results that follow:

String comments = aListing.additionalComments().replaceAll("\n", "\ \n");

I think I see what you are trying to do, but that does not make much sense. "\n" is a special character. "\" "n" are two normal characters that will not get converted back into line breaks. You might also be seeing some logging weirdness.


So, really, where are you going with this?


Chuck


When I do a access the information in the database, I assign everything from the CLOB to a string value. Without any adjustments to this information, it prints out to the example.txt document with multiple line breaks where I want there to be only the explicit characters '\n' in the .txt file. The file is set up as a download from the site which I have working just fine. The formatting of the text (if you will) in the .txt document is what I am having trouble with.





result:
Testing the new line
n
ncarriage return replace method
n
nfor the text download.


next:
String comments = aListing.additionalComments().replaceAll("\r", "\ \n");


result:
Testing the new linen
n
carriage return replace methodn
n
for the text download.

from this I decided it might have both carriage returns and line breaks so ...
String comments = aListing.additionalComments().replaceAll("\n", "\ \n");
comments = aListing.additionalComments().replaceAll("\r", "\\n");


result:
Testing the new linen
n
carriage return replace methodn
n
for the text download.


I want the result to be:
Testing the new line\ncarriage return replace method\nfor the text download


Can anybody give me a hint please?

Thanks,
Awbrey
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








Thanks, Awbrey

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Frontbase CLOB newline problem (From: Awbrey Hughlett <email@hidden>)
 >Re: Frontbase CLOB newline problem (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Frontbase CLOB newline problem
  • Next by Date: Re: Frontbase CLOB newline problem
  • Previous by thread: Re: Frontbase CLOB newline problem
  • Next by thread: Re: Frontbase CLOB newline problem
  • Index(es):
    • Date
    • Thread