NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Linebreak problem


Joined: 18 Jan 2008
Posts: 15
Location: Linz/Austria
Reply with quote
Hello!

I've opened some PHP files I downloaded from a server in NuSphere and every line break is repeated, which means that there is always an empty line between to lines. When I open those files in Windows Notepad there is no error at all. I tried to change 'Default file format' in settings menu to Unix, but that didn't help. Where can I find the settings, how linebreaks are interpreted?
View user's profileFind all posts by Thomas DSend private message


Joined: 26 Jan 2009
Posts: 12
Reply with quote
I believe it has to do with how PHPed transfers files. As far as I can tell it always sends them in Binary mode, so it leaves it up to the FTP server how it will translate Windows-formatted files.
Most FTP Client programs will transfer them in ASCII mode, which tells the server to convert windows-style newlines into Unix depending on the system.

See my thread posted last week: http://forum.nusphere.com/tip-troubleshooting-debugger-communications-ssh-t581.html

There are a lot of other threads on this issue all over the board if you search a little bit.

I'd love to hear that I am wrong on the ASCII/Binary thing, though. As far as I can tell, FTP transfer mode is non-adjustable in PHPEd, and if you're getting double newlines there's no fix besides uploading with a different FTP client (the standard answer has been to configure the remote server correctly; most people don't have the access to do that)
View user's profileFind all posts by pineappleclockSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
It's not actually correct.
In binary mode, neither client nor server can change anything in the file. All the line endings must be preserved as is.
In ASCII mode, both server and client re-interpret the line endings and may change the file content.

I'd recommend you to login to the server using ssh or telnet and check the file content in place. You may want to try any hex dumping programs to see actual line endings in your files. Maybe they are already corrupted. For example 0x10,0x13,0x10 and 0x13,0x10,0x13 variants will result in duplication in PhpED.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Linebreak problem
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic