Enter in a string

Hi,

I created a method that makes a string from a dataset/Array. Between each record I put a \n to get the records in the string under each other (“simulate Enter”, also tried \f and \r). Now, I’m experiencing the following problem:

When I copy the string into the ClipBoard and paste the ClipBoard into a textfile (I’m working on windows) all goes fine. I’ve I paste the string into a text area all goes fine, but if I write the string to a text file, using application.writeTXTFile, the different records are not under eachother, but on one line, separated by a little square box (viewed with NotePad on Windows)

From other experience I know this is a sort of Unix presentation. Anyone knows a sollution to solve this? Use something different to separate the records or a search and replace afterwards???

tnx in advance,

Paul

If you just use it as a seperator why bother with its presentation? What happens when you read it back? Have you lost it ‘\n’ then or is it gone? Is it notepad that changes this?

Normally such a thing happens on the mac, but here it is no problem…

The little square represents “enter”. If you would open the file in Wordpad or Word, it sees it as enter and the records are under eachother.

It’s just in Notepad andjust a display issue. Because of this the file becomes unreadable in notepad, because all the lines are behind eachother, instead of under eachother. Even if I cut and paste the example into the forum, the little square box behaves as “Enter” again.

My issue with this is that Notepad is often used to check the content of flat text files, because it shows the file as it actually is, without formatting. This makes it easy to check things, especially when you get import errors importing such a file into Excel…

Anyway, if someone knows a sollution… (getting a bit sidetracked from Servoy here.. :-) )

On windows the line separator is actualy \n\r and some programs do indeed not accept only a \n
so try \n\r

:( tried it: now I just get two little squares…

Hey, it works the other way around: \r\n

Thx Jan for getting me on my way!

Paul