|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
So I have my database and I read text from a webpage then put it in a record
including a field that is dataype TEXT. Of course I lose line breaks, so what happens is that the following sentence: This is line 1... .... and this is line 2 becomes "This is line 1... ... and this is line2" Is there some function I can call in Perl or something else I can do so I store and keep the format of the text? Many thanks.... |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Daniel Kaplan wrote:
> So I have my database and I read text from a webpage then put it in a record > including a field that is dataype TEXT. > > Of course I lose line breaks, so what happens is that the following > sentence: > > This is line 1... > > ... and this is line 2 > > becomes "This is line 1... ... and this is line2" > > Is there some function I can call in Perl or something else I can do so I > store and keep the format of the text? > > Many thanks.... > > > Look at the source for your web page. I suspect your line breaks are there, and your problem is that HTML ignores them. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:vcudnX6Mb7d1lr3anZ2dnUVZ_qHinZ2d@comcast.com. .. > Look at the source for your web page. I suspect your line breaks are > there, and your problem is that HTML ignores them. you make a good point, but then it comes to me finding them before i put them in the DB, then converting them to <P> and <BR>, no? off the top of your head, do you know what they are in the edit field when i read it? \n? \r? thanks |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 25 Oct, 04:47, "Daniel Kaplan" <NoS...@NoSpam.com> wrote:
> "Jerry Stuckle" <jstuck...@attglobal.net> wrote in message > > news:vcudnX6Mb7d1lr3anZ2dnUVZ_qHinZ2d@comcast.com. .. > > > Look at the source for your web page. I suspect your line breaks are > > there, and your problem is that HTML ignores them. > > you make a good point, but then it comes to me finding them before i put > them in the DB, then converting them to <P> and <BR>, no? > > off the top of your head, do you know what they are in the edit field when i > read it? \n? \r? > > thanks Depends, how are you "read[ing your] text from a webpage"? |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Daniel Kaplan wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message > news:vcudnX6Mb7d1lr3anZ2dnUVZ_qHinZ2d@comcast.com. .. > > >> Look at the source for your web page. I suspect your line breaks are >> there, and your problem is that HTML ignores them. > > > you make a good point, but then it comes to me finding them before i put > them in the DB, then converting them to <P> and <BR>, no? > > off the top of your head, do you know what they are in the edit field when i > read it? \n? \r? > > thanks > > > Nope, you shouldn't be storing html commands in hour database. What if, for instance, you decide you need to access it from a non-web based environment, i.e. a command-line utility to generate some reports? The formatting should be done after you retrieve the data form the database, not before. For the rest, try a programming group for the language you're using. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
![]() |
| Outils de la discussion | |
|
|