carriage-return

SVN Update adds ^M when conflicts?

We've been working on some files at the same time. Occasionally, when we "svn up" we'll see files with "^M"'s appended to every line of certain files. We originally blamed each other's editors >_>. We have since narrowed it down to "svn up"ing when conflicts exist. If we isolate the conflicted file and svn no "^M"'s appear. No "^M...

Text Editor which shows /r/n?

I'm looking for a text editor that can show me the actual carriage returns and newlines. E.g. if I save this string: "This\rIs\r\nA\nString" Instead of showing This Is A String I'm looking for some text editor which will show This\rIs\r\nA\nString I believe a problem with my text-file parsing in a certain program is being caused ...

Parsing commandline output progression containing carriage returns in real time with python

I am able to transform carriage returns into new lines. The problem however is to get it running in nearly 'real time'. It will be quite stupid looking if progres bar only values are 0 and 100 :-) This code returns output at once: import subprocess p = subprocess.Popen(['mplayer', '/home/user/sample.mkv'], stdout=subprocess.PIPE).comm...

Port dos2unix to brainfuck

I got into an argument over on SuperUser.com about useless answers and found myself challenging the other poster to answer the question in brainfuck. He didn't take me up on it, but now I'm curious. All the program needs to do is convert CRLF line endings to LF (dos-style to unix). Any bf coders around that can help out? ...

How to remove the carriage return from string while pasting content to Excel file

I have a problem while pasting my contents (or text) generated by Java code into excel. The problem is that my Java code generates a String with multiple lines, i.e. with line breaks (\n) included. When I try to copy this content and paste it into an Excel file, I am getting a multiline text with a square box symbol. I came to know tha...

Difference between \n and \r?

Whats the difference between \n (newline) and \r (carriage return)? Edited to add: All the answers are fairly predictable, but I'd be interested to know if there are any PRACTICAL differences between \n and \r. Are there places where one should be used over the other? ...

How do I correctly handle CR when reading text files with OleDB

I have text files that are Tab delimited. I created a Schema.ini like so: [MY_FILE.TAB] Format=TabDelimited ColNameHeader=False Col1=id Short Col2=data Text This is the code I use to read it (C#): using (var connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\FolderToData\;Extended Properties='text;FMT=...

Carriage Return in Accordion Control Header - Silverlight 3.0

Hi Folks. I've got an Accordion control in my Silverlight app, and I'd like to be able to insert a carriage return in the title of one of the AccordionItems. I've tried inserting various symbols such as "" and ""... but nothing has worked. Appreciate any help. Thank you. ...

generating a CSV file, what carriage return character should I use?

I have to create a CSV file that represents an order. The file is going to be FTP'd over, and imported into another system. What line feed/carriage return character should I use? I am pretty sure the receiving end will be a microsoft system, is there a way to make it server agnostic? ...

How can I remove "\r\n" from a string in c#? Can I use a regEx?

Hi All, I am trying to persist string from an ASP.NET textarea. I need to strip out the carriage return line feeds and then break up whatever's left into a string array of 50 character pieces. I have this so far var commentTxt = new string[] { }; var cmtTb = GridView1.Rows[rowIndex].FindControl("txtComments") as TextBox; if (cmtTb != n...

Changing CR/LF output type in Visual Studio

Hi all: I have a c# project in my Visual studio 2008 which when built, outputs a bunch of files in a temp directory for other programs to use i.e. JsTestDriver, JsCoverage, etc (all a bit Unix-related). Trouble is, everytime when the files were generated, they seem to contain weird return carriage/line feed which upsets the programs th...

AS3 TextField - unwanted carriage return when setting value to ""

I have an input TextField and have a KeyboardEvent.KEY_DOWN even listener on the stage to listen for the Keyboard.ENTER event. The event listener adds the entered text to an array or whatever, and then clears the TextField. The problem is that when the Enter key event fires and the TextField value is set to "", it leaves a carriage ret...

VB.NET: Regular Expression needed to replace return character with another string.

I'm trying to replace all the carriage return characters in a string obtained from a multi line text box in a Windows Form with the string ", <BR>" so that when I use the string in some HTML it displays correctly. Function Blah(ByVal strInput As String) As String Dim rexCR As Object rexCR = CreateObject("VBScript.RegExp") rexCR.Pa...

Problem copy+pasting CR+LF into an excel spreadsheet need soft paragraph (Alt+Enter)

I'm trying to copy a table that is created in our software into an excel spreadsheet. Some of the title headers in our application are too big to fit in a column so they are separated by a #13+#10 (CR+LF) so they sit on the next line. e.g. Strain SpikeConc Spike ng/g dpm/g ------------------------- Blah 20.0 5...

VisualForce: convert carriage returns to html line-breaks in a long text field

In Salesforce, if I'm binding a text field into a VisualForce page, whats a good way to convert the carriage returns in the text-field into HTML <br/> tags? e.g. starting from something like this: <apex:page standardController="Case"> <apex:pageBlock title="Test"> <p>{!case.Description}</p> </apex:pageBlock> ...

How do I send a Carriage Return with Windows Netcat?

I want to type directly into the Powershell prompt too, not pipe in a text file. Foo`r doesn't work for me. For example: echo "RJ`r`n" | .\nc.exe -u 192.168.1.247 2639 but what I'd really like to do is just .\nc.exe -u 192.168.1.247 2639 then start typing into the prompt. ...

UITextView - preserving carriage returns on COPY - iPhone

Hello Everyone, When I try to copy text from a UITextView to say an Email message to compose and send, the carriage returns (new lines) of the text disappear and the text connects up into one LARGE paragraph. I am not sure why this is happening. How do I fix this? Thanks ...

What is the carriage return character in an AS/400 db?

I have a client running an AS/400. I have to ftp a flat file over to them. They tell me their return charaters are RN. I don't recognize this, could not find anything on it, and their tech guy is Nick Burns so he refuses to give me any dirtection. Is there a standard return code for AS/400? I should have mentioned that I have a c# .NET ...

Python print statement prints nothing with a carriage return

I'm trying to write a simple tool that reads files from disc, does some image processing, and returns the result of the algorithm. Since the program can sometimes take awhile, I like to have a progress bar so I know where it is in the program. And since I don't like to clutter up my command line and I'm on a Unix platform, I wanted to us...

Making CSV from PHP - Carriage return won't work

Seems like a fairly simple issue but can't get it to work. I am getting the user to download a csv file(which works fine). Basically I can't get the carriage return to work. header("Content-type: text/x-csv"); header("Content-Disposition: attachment; filename=search_results.csv"); echo '"Name","Age"\n"Chuck Norris","70"'; exit; Res...