Solved

An additional character getting inserted when use chr(10)

Posted on 2008-06-20
3
2,383 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I showed you how to use console view (HERE (http://www.experts-exchange.com/articles/18379/Getting-Started-and-Using-the-Salesforce-com-Console.html)) -– but how do you set it up on the admin side of Salesforce? Note that you have to have Admin leve…
Note: You must have administrative privileges in order to create/edit Sharing Rules. Salesforce.com (http://www.salesforce.com) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales an…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

10 Experts available now in Live!

Get 1:1 Help Now