Solved

An additional character getting inserted when use chr(10)

Posted on 2008-06-20
3
2,384 Views
Last Modified: 2010-04-30
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.
0
Comment
Question by:TG_Sekhar
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
moorhouselondon earned 100 total points
ID: 21836890
chr(10) is the LineFeed character.
                                                     On its' own, this is the effect it has.  Is this what you want?


Most apps do a chr(13) + chr(10)
which is carriage return + line feed, so that the text not only goes onto the next line, but returns to the left hand side as well, as in this example
0
 

Author Comment

by:TG_Sekhar
ID: 22209818
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.
0
 
LVL 31

Expert Comment

by:moorhouselondon
ID: 22210454
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.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connect MS Access to Cloud JD Edwards Database 4 443
application contracts/SLA's 2 78
MIS vs ERP 11 221
What ERP development platform 4 49
Salesforce.com’s Console is a great tool to view activities, leads, contacts, accounts and opportunities all in one screen. It is particularly effective during call blocks and working numerous activities at a time in a quick, repetitive fashion (suc…
Read about achieving the basic levels of HRIS security in the workplace.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now