Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copying file



Daniel Child <email@hidden> wrote:

>This approach (found where you suggested in the Java tutorial) is
>obviously more streamlined than what I was doing. But TextEdit still
>failed to open the new rtf file!!! The file and its icon appear in my
>Build folder next to the original, but the open fails.
>
>Just to make sure that the TextEdit was properly encoded as UTF8, I
>selected that for Save encoding in Preferences, rather than "automatic."
>Still didn't work.

I just tried your new code, and it works perfectly for me.

When I tell it to use "Trial.rtf" as input and "dup.rtf" as output, the
file's contents are perfectly replicated. I have both accented
Roman-alphabet letters and a few Katakana characters in "Trial.rtf".

The duplicated file opened correctly in TextEdit, without any failures of
any kind. Maybe you can describe exactly what happens when, as you said,
"the open fails".

I also used these commands in Terminal to calculate checksums:
md5 *.rtf
cksum *.rtf

The numbers are identical for both the original and the duplicate files,
proving to me that the contents are identical. The numbers calculated by
each command differ, since they calculate checksums differently.

When I use this command:
ls -l *.rtf

I can also see that the file lengths are identical.

I don't know exactly what you're doing, or where you're putting your output
file, but make sure it's where you think it is. If you're actually opening
an old file in TextEdit, not the new one, you will still see old mangled
data. Delete your old output files.

Also, TextEdit may not know to open the duplicate-file as RTF unless you
have the ".rtf" suffix on your program's output file. Be sure to type that
into your program as part of the output-file name.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >copying file (From: Daniel Child <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.