It's correct that you always open files in textmode. However, the data you write can be arbitrary. If you want to save a number between 0 and 255 you can use file_asc_write and nobody will be able to read that. If you want to store an integer, you can use file_asc_write four times and shift the bits during use of file_asc_write.
What do you mean by "you can't place the pointer whereever you want"? If you are refering to the file pointer you can manipulate it with file_seek. From time to time file_find comes even in very handy.
If you'd give me a more detailed description of what you want to save I could throw my fifty cents in. I'm still note sure why you want to clip and trunc strings...