For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > October 2005 > New Line Character(s)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author New Line Character(s)
Daniel Kasak

2005-10-26, 6:56 pm

Greetings.

I've got some Perl code that's inserting data into a MySQL, which is
later being read & displayed by MS Access. I'm constructing a note, and
I'm using:

\n

for new lines - to break up paragraphs. However, in Access, these \n
characters appear as little boxes instead of new lines. What should I
use to get Access to display a new line?

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@nusconsulting.com.au
website: http://www.nusconsulting.com.au
Timothy Johnson

2005-10-26, 6:56 pm


I think you can use \r instead of \n for Access and Excel.

-----Original Message-----
From: Daniel Kasak [mailto:dkasak@nusconsulting.com.au]=20
Sent: Wednesday, October 26, 2005 4:18 PM
To: beginners@perl.org
Subject: New Line Character(s)

Greetings.

I've got some Perl code that's inserting data into a MySQL, which is=20
later being read & displayed by MS Access. I'm constructing a note, and=20
I'm using:

\n

for new lines - to break up paragraphs. However, in Access, these \n=20
characters appear as little boxes instead of new lines. What should I=20
use to get Access to display a new line?

Chris Devers

2005-10-26, 9:55 pm

Stephen York

2005-10-27, 3:55 am

If you have \n on its own in Access or Excel you get a new line within a
cell.
Also if you only have \n all the way through the file, then you
effectively have one huge record which can't be loaded into memory (size
dependent);
\r\n is required in windows to indicate the end of a line.
\n only for linux, and I think macos is something else again, but I've
never developed on a mac before so I can't confirm.
This is a widely discussed topic on the internet and not difficult to
find answers on.


Stephen York


Chris Devers wrote:

>On Wed, 26 Oct 2005, Timothy Johnson wrote:
>
>
>
>
>Are you sure about that?
>
>I thought Windows used \r\n as a pair (or \n\r?) for the line delimiter.
>
>But then, I don't do Windows anymore, so I could be wrong :-)
>
>
>
>
>



Daniel Kasak

2005-10-27, 9:55 pm

Chris Devers wrote:

>On Wed, 26 Oct 2005, Timothy Johnson wrote:
>
>
>
>
>Are you sure about that?
>
>I thought Windows used \r\n as a pair (or \n\r?) for the line delimiter.
>
>But then, I don't do Windows anymore, so I could be wrong :-)
>
>

Same here usually.
Thanks for the tip.

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@nusconsulting.com.au
website: http://www.nusconsulting.com.au
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com