Link to home
Start Free TrialLog in
Avatar of Sekhar T G
Sekhar T GFlag for India

asked on

An additional character getting inserted when use chr(10)

Whenever I use chr(10) an additional character is getting inserted (May be chr(13)).  How to get rid of this.
Please do not suggest to open the file using another programming language and use a replace command.  This is tried and working.  But neither elegant and also can take time when my file size is large.
ASKER CERTIFIED SOLUTION
Avatar of moorhouselondon
moorhouselondon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sekhar T G

ASKER

Sorry for a delayed feedback.
I am getting by inserting chr(10) the effect of both line feed + carriage return.  Apart from that I am getting a non-printable character in addition.
The current work around being used to get rid of this is to open the file in textpad and save in PCDos format.
Any other elegant solution is welcome.
What is the ASCII code for the non-printable character?  Either open the file you are saving using debug (at the command prompt), or use a hex editor.  Both of these will give you the Hexadecimal code for the spurious code.

debug file.txt

Useful debug commands (press Enter to invoke command)

D
Displays the next block of data from the file

Q
Quits back to the command prompt.