File component
Moderator: Moderators
File component
encoding:- figured out the char OK, however how the binary works remains a mystery.

What are you trying to do exactly? The File Component by itself doesn't do much .. regardless of character / binary encoding.
Rule of thumb is when you work with "readable" data ( stuff you'd do in notepad ) you should go with char, while you'd want to use binary for anything else ( data you would use a hex editor for ).Char: One byte is read at a time. The value read is an integer between 0 and 255 (the ascii-value of the character in a text file).
Binary: Four bytes is read at a time. This can be used to read variables with the full decimal precision.
K
It sure doesn't do much. I got some interesting results with this test. How it might be useful, I don't know.

Edit - #2 might be more interesting to someone.

Edit - #2 might be more interesting to someone.
- Attachments
-
- fileTest2.zip
- (946 Bytes) Downloaded 482 times
-
- fileTest.zip
- (710 Bytes) Downloaded 484 times

So ... what's the problem again?
In the first test you're reading what appears to be a char encoded file ( bbbbaaaa ) using binary encoding, casting the bytes to a float.
In the second you're doing the same, but also write the content back to a file .. which results in a copy of the original file.
Both seem perfectly normal, even though I don't see any practical use for such char / binary conversions .. but maybe I'm missing something?
K