Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-08

Reading non-printable caracters in file (linux)

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

TOUZEAU DAVID

Dear.

I need to read /proc/pid/cmdline files

But if i use a standard function that read file with assign,"readln",EOF some important non-printables caracters are not trapped

with fpc readln :
imapd-s-U30

if i use cat -v "cat -v /proc/26328/cmdline"

@@

Did anybody has developped a function that read a file include non-printable caracters "^@" like a cat -v command line tool ?

Best regards

David Touzeau -------------------------- Linux Ubuntu 7.04 feisty FreePascal-Lazarus,perl,delphi,php artica for postfix management console (http://www.artica.fr) icq:160018849
Jonas Maebe
to TOUZEAU DAVID
TOUZEAU DAVID wrote
Did anybody has developped a function that read a file include non- printable caracters "^@" like a cat -v command line tool ?

You can use the blockread function.

Jonas