Information générale
Catégorie:
Codage, syntaxe et commandes
>Does anyone know why an FGETS() function would stop at a CHR(26) value of HEX '1A' rather than a CHR(13) Hex '0D' Carriage Return as it is documented?
>
>
>I am losing data on a low-level file read when reading record by record because of garbage data being sent to us in a file. We have been stripping out CHR(0) values to clean up the data, but this is a new piece of garbage being supplied to us to check for.
>
>TIA
HEX '1A' is a long time DOS end of file marker for text files. I believe FREAD() will read past that byte. If so, just read the file with FREAD() if you need the line reading capability of FGETS(), write the file back after having changed the '1A' to some other byte, then do your thing with fgets().
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement