Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to handle CR key

when reading from a text file i am getting D(in hex)for Carrige Return. i am writng the character back in another file and it is printing it as "empty rectangle".
how can i have a CR instead of "empty rectangle" in the output file.
pl. help

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : when reading from a text file i am getting D(in hex)for Carrige Return. i am writng the character back in another file and it is printing it as "empty rectangle".
    : how can i have a CR instead of "empty rectangle" in the output file.
    : pl. help
    :
    [blue]What function are you using when reading?
    When writing? Also, if you reading text files symbol-by-symbol you should use the binary type when opening/creating these files.

    Usually, if you deal with text files - use [b]fopen()[/b] and [b]fgets()[/b]/[b]fputs()[/b] to read/write.[/blue]
  • Shawn CarterShawn Carter Member Posts: 0

    ___ / http://forcoder.org / free video tutorials and ebooks about | PL/SQL, Ruby, Swift, JavaScript, C, Java, C++, Visual Basic .NET, R, Assembly, Visual Basic, Go, Objective-C, Delphi, MATLAB, C#, PHP, Scratch, Python, Perl D, Rust, Hack, Lisp, SAS, Logo, Kotlin, Prolog, FoxPro, Dart, Transact-SQL, Ada, Scheme, LabVIEW, Clojure, Lua, Scala, Apex, Awk, Erlang, ABAP, F#, Alice, Julia, VBScript, ML, Fortran, Crystal, Bash, COBOL | ___________

Sign In or Register to comment.