Let's say I have a text field here named "Description". In the Description field, I entered the following text:
This is line 1.
This is line 2.
This is line 3.
When I input these text to the Description field using IE or Chrome and run the SQR process, the description is displayed correctly including the newlines. But when I enter the same description using Firefox (v35.0.1 btw), the description is being printed in the report like this:
This is line 1. This is line 2. This is line 3.
I am sure that in my SQR there are no procedures that strip off the newlines (because it is working with IE and Chrome). I have also validated backend that the description has newlines.
Using the data entered in Firefox, I also tried running the report in IE and Chrome, but the newlines are still not displaying.
Can you tell me why is this happening? Is there a difference between the newlines used by IE, Chrome, and Firefox?
This is a known issue, google firefox textarea newline.
Firefox represents an newline as linefeed character ascii(10) whereas internet explorer as a combination of carriage return character and linefeed character ascii(13) ascii(10).
To ensure the data is saved in the way it's required for your further processes, you could add component record peoplecode, SavePreChange:
/* Newline is Char13)+Char(10) */
YOUR_REC.YOUR_FLD.Value = Substitute(
Substitute(YOUR_REC.YOUR_FLD.Value,
Char(13) | Char(10),
Char(10)),
Char(10),
Char(13) | Char(10));
Related
(I am new with this) I see these weird black text-boxes and, as far as I know, they are ascii symbols, but I don't know how to see it in a "normal" view, if possible. Thanks in advance!
It was a bit hard to follow your link, I included the screenshot in your question. The ESC indicates a non-printable character. In this case it is the Escape character (ASCII 27), which from the screen shot appears to be part of escape sequences to change text color.
Unfortunately, Notepad++ does not have the means to render them as intended. One option is that you select one and find/replace with nothing. If you want to get rid of not only the ESC but also its associated "parameters" you can use this regular expression to find and replace them
\x1b[^m]*m
I have two asp.net pages. both pages have many form controls including textarea control.
on one page when user enter the data with enter key including the textarea post the enter key as '\r\n' and on other page enter key post as '\n'.
i don't understand why the behavior is different. on both pages.
there are different meaning of both as below
\r = CR (Carriage Return) // Used as a new line character in Mac OS before X
\n = LF (Line Feed) // Used as a new line character in Unix/Mac OS X
\r\n = CR + LF // Used as a new line character in Windows
You can visit this link
Difference between \n and \r?
Edit 1
IE returns "\r\n" to indicate newlines. FF returns "\n" in this case.
References What's with the line break variations in C# and ASP.NET? (\r\n vs.\n)
I write all of my books in an ancient DOS program Maxthink. If I copy text into an app that saves it as a text file, which I get is garbled. Regular alpha-numeric characters are ok; semicolons & quotation marks are not. I have one app that allows me to save in UTF 8 & 16. One of the UTF options does not garble the text, but leaves spaces where the puntuation is supposed to be.
Sometimes I echo a string to the standard output (I see it at the Kubuntu console) and a trailing % symbol gets appended with it's colors inverted (black text on white background).
I can't find any accidental additional character (or half-baked-UTF8 or anything) in the string I'm printing. The character seems to get added when the program finishes.
I'm using Go (golang) right now, but I've already seen this in the past, and I think I was using PHP back then.
What could be causing this?
what shell are you using? sounds like what happens in zsh when there is no carriage return at the end of your output
I use some telerik report to print some report.
I need to use Telerik.Reporting.TextBox to print labels.
Some labels are stock in .txt files, like " Apple".
When I see a label with spaces, it means I have to indent it in the report, so in the TextBox.
The thing is when we export the report in pdf, we have the indentation, but not when we see in the browser. If I replace the spaces by "& nbsp;", we see the indentation in the browser, but when exporting to pdf, we see the "& nbsp;".
One way to do this is to use HtmlTextBox, so both the browser and the export works fine, but we have other constraints that says we must keep the TextBox.
My idea is to replace the spaces by a blank character, an invisble one, like alt+0160, but there is a lot of choice, and I want the one that will work in any browser, any export (TIFF, PDF, Excel...).
Is someone have a good clue about this choice ?
You could use Unicode code point U+00A0 (non-breaking space), which is what the entity represents. How this should be encoded in your document depends on the character set in use.
You can replace the with ""