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...
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 ...
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...
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?
...
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...
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?
...
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=...
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.
...
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?
...
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...
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...
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...
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...
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...
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> ...
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.
...
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
...
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 ...
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...
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...