newline

Preserve newlines when parsing xml

I'm using the SAX xml parser to parse some xml data which contains newlines. When using Attributes#getValue, the newline data is lost. How can keep the newlines? ...

c#: how to insert string containing new lines into TextBox

c#: how do you insert a string containing new lines into a TextBox? When I do this using \n as the new line character, it doesn't work. ...

Newline in datagridview cell vb.net

I'm trying to insert a new line in a cell of my datatable. When I hover the cell it shows it like it should. Everything has a new line. Otherwise in the gridview I see the string in 1 line. Dim info As String = dttopdrachten.Rows(j).Item(0).ToString & vbCrLf & dttopdrachten.Rows(j).Item(2).ToString & vbCrLf & dttopdrachten.Rows(j).Item...

Zend_Db : Retaining \n (newline) characters for output

I am building an application based on the Zend Framework, and my issue is that whenever I grab data from the database (from inside the respective model class) using the fetchAll() method, despite the fact that \n characters are stored in the database for the string I'm trying to fetch, when I output the variable to the view script, there...

How can I generate XML with CR, instead of CRLF in XmlTextWriter

I'm generating XML via XmlTextWriter. The file looks good to my eyes, validates (at wc3), and was accepted by the client. But a client vendor is complaining that the line-endings are CRLF, instead of just CR. Well, I'm on a Win32 machine using C#, and CRLF is the Win32 standard line-ending. Is there any way to change the line-endings...

\n not working in UIlabel

Hi guys, I've seen similar questions here, but still can figure out why it's not working. How to add line break (in other words add new paragraph) in multiline UIlabel? I have a label with a lot of text, lbl.numberOfLines = 0; lbl.sizeToFit; but I'm still getting something like this: "Some text here\nAnd here I want new line" Thank...

how to remove blank lines with grep

I tried grep -v '^$' in Linux and that didn't work. This file came from a Windows file system. ...

Bizarre php shell script behavior

It may help if you are on a Mac and use TextMate, though not entirely necessary. My php location: $which php /opt/local/bin/php The script: #!/opt/local/bin/php <?php shell_exec("echo -n 'my-string' > out.txt"); ?> The -n to echo suppress the newline that is automatically added to all shell echo commands. If I run the ab...

How to insert new line 3 white spaces or 2 words prior to specific character.

I was trying to format a chat log for a friend that looks like this: John Smith > hello Jane doe > hey how are you? John Smith > Pretty good thanks and she wants to format it like this: John Smith > hello Jane doe > hey how are you? John Smith > Pretty good thanks Simply entering a new line after > is not good enough as it would ...

Why does adding or removing a newline change the way this perl for loop functions?

I'm starting to learn perl, using the Wrox Beginning Perl available on perl.org and have a question regarding a for loop example they provide in Chapter 3. #!/usr/bin/perl use warnings; use strict; my @count = (1..10); for (reverse(@count)) { print "$_...\n"; sleep 1; } print "Blast Off!\n" This is the script they pr...

bash line concatenation during variable interpolation

$ cat isbndb.sample | wc -l 13 $ var=$(cat isbndb.sample); echo $var | wc -l 1 Why is the newline character missing when I assign the string to the variable? How can I keep the newline character from being converted into a space? I am using bash. ...

AS3 trace w/out newline

For diagnostic purposes, I want to print a matrix (an array of arrays). To do this with a loop means executing a trace command multiple times, whichto my understandingprecludes the possibility of printing multiple table cells to a single row. (When coding trace(x); trace(y);, a line break falls between x and y.) What can I do? ...

Problem getting input from user

Here's the code : cout << "Please enter the file path: "; string sPath; getline(cin, sPath); cout << "Please enter the password: "; string sPassword; getline(cin, sPassword); Problem is, when I run it it displays "Please enter the file path: " then it displays "Please enter the password: " and then waits for the password. It seems to ...

Replace \r\n Newlines using XSLT and .NET C# VS 2008

I use VS 2008, .net 3.5 for generate page html using XSLT. I have Message, that contains \r\n (newlines) I use this in XSL file: <b>Message: </b><xsl:value-of select="Message"/><br/> I need replace \r\n by <br/> in xsl. I have seen several references but not get solution for my issue: I use this code C# before I call to transform X...

ASP.NET MVC string formatting c# - by 100 characters make 4 rows each 25 characters

I have a string with 100 characters and it is for me too long in one line. I want to make NewLine after each 25 characters. For example: Instead: "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua." Just a: "Lorem ipsum dolor sit ...

View line-endings in a text file

I'm trying to use something in bash to show me the line endings in a file printed rather than interrupted. The file is a dump from SSIS/SQL Server being read in by a Linux machine for processing. Is there any switches within vi, less, more, etc? In addition to seeing the line-endings, I need to know what type of line end it is (CRLF or...

Newline showing up on screen but not in email

I have a list (errors) that I both print to the screen and send in the body of an email. But first I separate the elements of the list with a newline character: "\n".join(errors) I then print it to the console and send it as an email. On the console it appears delimited by newlines: Error generating report Another error In the emai...

[iphone] How to put \n into string in plist

Possible Duplicate: NSString: newline escape in plist I have a plist with a string, and I want to get line breaks. Putting \n\n doesn't work. Is there any other way to do this? Thanks ...

CKEditor remove spaces/tabs from between headings

Hello! CKEditor does this whenever I add a heading tag: <h2> Mai 2010</h2> How can I remove the new line and spaces after the h2 starting tag, please? ...

Native newline characters?

What's the best way to determine the native newline characters such as '\n' or '\r\n' in Haskell? I see there is a "nativeNewline" function in GHC.IO:Handle, but assume that it is both a private API and most of all non-standard Haskell. ...