Up | English 改行コード処理の問題 作成: 2006-12-27
更新: 2006-12-27


from : http://www.rbrowser.com/FTPNotes.html

The Macintosh community is used to being different... UNIX uses the linefeed character to end lines in text files (ASCII 10), whereas legacy MacOS uses carriage return (ASCII 13). So, one had a problem: if you are maintaining a website, you edit your pages on a Mac, the line endings in these pages must be translated to UNIX during the upload.

Of course, it is a very inexact science figuring out which file is text, which is formatted text (like RTF) or worse, binary. Attempting translations on anything but basic text files corrupts the file! Your trusty old Fetch 3.0.3 did this very well in the old world by relying on types and creators to figure out what files to translate... Guess what! This is the new world now. In this brave new world, Mac text files and UNIX text files coexist, and most text files have no types/creators at all. This makes translation especially on download very difficult, since it is impossible to know if the file was intended to be a Mac or a UNIX text file.

Our recommendation: stay away from any of this and use the default, which is binary.
Most HTML editors, BBEdit among them, are perfectly capable of translating your old mac text format into the UNIX format and keeping it there! Make sure you set the preferences in BBEdit or your editor to use UNIX line endings. THIS IS THE STANDARD IN OSX!.
For those of you who want to still use the translations, here are the rules: On upload it pretty much works as expected; in Automatic mode RBrowser uses type/creator info to figure out if a file is to be translated or not.
On download, text mode will mean that the downloaded file will be a Mac text file! If you use unix files, use binary mode only.