carriage-return

Why does a carriage-return character disappear when converting a string to SQL Server XML datatype?

Whenever I parse a string to SQL XML datatype I notice that carriage-returns disappear whenever whitespace and XML carriage returns are mixed. If they are not mixed things work fine. Does anyone know why this is happening? See the SQL example code below DECLARE @var XML PRINT 'This is a statement with two XML carriage-return character...

Add a Carriage Return to the Output of an XSL Transformation

I am trying to use XSLT to convert an XML document to a text file and the text of the document looks fine. However, I need to add a carriage return after the end of each line (NOT A CRLF) and I seem to be failing in every attempt. I have tried adding just a CR at the end of the line like this: <xsl:text>&#xD;</xsl:text> I have trie...

How to read line by line a CR-only file with Perl?

I'm trying to read a file which has only CR as line delimiter. I'm using Mac OS X and Perl v.5.8.8. This script should run on every platform, for every kind of line delimiter (CR, LF, CRLF). My current code is the following : open(FILE, "test.txt"); while($record = <FILE>){ print $record; } close(TEST); This currently print onl...

Formatting populated textarea, carriage returns, newlines, and HAML

When i populate a textarea with text using \r\n (carriage return - newline) the text is formatted improperly [UPDATE: \r\n is what is generated when filling out a textarea, i'm simply pulling from a database what was previously filled in. Also to note, in the production environment i don't seem to have this problem. END UPDATE] For examp...

Replace CR with CRLF in a Textfield

Hello, i got some problem with replacing a CarriageReturn (CR) to a CarriageReturn LineFeed (CRLF) entry´s in a textfield on MS SQL 2005 System. There´s a table "notice" where a textfield "desc" is filled with some content which contains some CR. So some example is: Mister Smith "CR" Road 123 "CR" Germany I try to replace the CR with...

.NET Winforms textbox - how to account for non-standard linebreaks?

I have an app that has a multiline text box on it. This is data that comes from a client application elsewhere. There are different versions of the client app for different platforms, and furthermore these platforms have different default rules about line endings. Thus, the data I want to show in the textbox might have CR+LF line endi...

How to remove a ^M character java

Problem: If String ends with \r, remove \r I started with something like this if (masterValue.endsWith(CARRIAGE_RETURN_STR)) { masterValue = masterValue.replace(CARRIAGE_RETURN_STR, ""); } where public static final String CARRIAGE_RETURN_STR = (Character.toString(Constants.CARRIAGE_RETURN)); public static final char CARRIAGE_RETU...

mysql stored procedures limit of lines/characters

Hi guys, once again I've run into a problem with mysql stored procedures. It's a tricky one and I'll stupply some teest data. Basically I have this load of text Operation Manna - Lancaster Series (7) The 29th April sees the anniversary of one of the most unusual RAF Lancaster operations in WW2. The Netherlands was deep in what became...

Why do I get different EOL for different files?

What can cause Notepad++ to make new lines as CRLF in one file and only LF in the other? Both files were created at the same folder from the same OS and no modifications to Notepad++ preferences were made, AFAIK... Is there any option in Notepad++ that changes how new lines are defined? ...

Python PyDev, Prevent carriage returns from input()

EDIT-4 I've gotten my sitecustomize.py to execute, but it tosses up an error. Here's the code for it. The error is: Error in sitecustomize; set PYTHONVERBOSE for traceback: RuntimeError: maximum recursion depth exceeded while calling a Python object I'm not terribly advanced with Python yet, so I figured I'd comment out only the l...

How to remove a carriage return from a string in C ?

Possible Duplicate: Remove characters from a string in C Do you have an example of C code to remove carriage returns in a string? ...

See line breaks and carriage returns in editor

Does anyone know of a text editor on linux that allows me to see line breaks and carriage returns? Does vim support this feature? Thanks. ...

Why do I get extra line breaks in the web page I download with Perl?

I'm writing a simple Perl script (on Windows) to download the response of a get request to a url to a file. Pretty straight-forward. Except when it writes to the output file, I get extra line breaks. So like instead of: <head> <title>title</title> <link .../> </head> I get <head> <title>title</title> <link .../> </head> ...

Gracefully remove "\n" delimiter after last String within StringBuilder

Have following Java code,that creates StringBuilder with "\n",i.e. carriage return delimiters: while (scanner.hasNextLine()){ sb.append(scanner.nextLine()).append("\n"); } It's occurred,that after last String(line) had "\n" symbol. How to gracefully remove last "\n" from resulting StringBuilder object? thanks. ...

Add carriage return to string resource in WPF

My applications store all localized text in a string resource dictionary as suggested here http://msdn.microsoft.com/en-us/library/bb295251(VS.85).aspx <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:system="clr-namespace:S...

In C#, what's the difference between \n and \r\n?

As per subject... ...

difference between ckeditor entermode div and entermode p

Hi, I noticed that CkEditor has problems with using entermode br ( mainly slowness after typing text for a long time ). So i'm looking into the other entermodes ( p and div ) . I see that entermode p is adviced by CkEditor. However , this introcudes margins below the content , which is not desired ( as the users are not used to typin...

Carriage return inconsistency with XCode

Hello all, I have a problem using a carriage return to rewind to the beginning of a line within XCode. This small example: std::cout << "will not see this\rwill see this" << std::flush; std::cout << std::endl; // all done compiled in XCode results in: will not see this will see this whereas, when I compile it in the term...