Hey loop:

On Sunday, December 22, 2002, at 03:35 PM, James Brennan wrote:

It's a new day and I'm still trying to figure my flat-text database update problem out. I am uploading from mac to unix .
I Assume you are uploading from Mac OS 9 or earlier, 'cause OS X is UNIX :)
(Although OS X is able handle Windows, Mac OS 9 and UNIX line endings).

 Does a .txt file have a resource fork?
File name extensions in Mac OS 9 have little meaning so I assume you mean a file with a file type of 'TEXT'. Text Files created with MS Word, for example, in fact do have a resource fork, but if uploaded in "raw" form, the resource fork is left behind and what is sent is just the text, or the contents of the data fork.

Keep in mind that a file with a file extension of .txt could be any kind of file.

Is the resource fork from the mac file automatically scraped by unix, or do I have to do that?
The resource fork is not sent unless the file is BINHEXed i.e converted to a binary file with the resource fork and data fork munged together. The receiving end has to be able to decode this type of file, which is _not_ text.

When your file is uploaded via HTML form, if it is text, perhaps in PHP you could look for \r or \n and make sure that the UNIX line ending is there - not sure which MacOS 9 uses.

HTH somewhat.
David

Would it be efficient to strip the resource fork with PHP? Has anyone written anything to deal with this? If not, any resources to help me figure out how to do it would be appreciated.

Thanks,
loop



----- snip snip -----
I'm using a HTML form to submit flat text files to a MySQL database. When I upload the text file by FTP the script that loads it's contents into the database works as expected. When I upload using the HTML form it seems to ignore the new line in the text file. As a result it only creates one row in the table with some overflow in the last cell. Does anyone know how to deal with this?


_________________________________________________________________
The new MSN 8: smart spam protection and 3 months FREE*. http://join.msn.com/?page=features/ junkmail&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/ getmsg&HL=1216hotmailtaglines_smartspamprotection_3mf


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to