Questions tagged [plaintext]

Plain text refers to any string or sequence of characters that consists entirely of ASCII printable characters.

Plain text refers to any string or sequence of characters that consists entirely of ASCII printable characters (human-readable characters). The key attributes of a plain text are that the text that is not computationally tagged, specially formatted, or written in code.

496 questions
15
votes
2 answers

How to process TXT e-mail template with Thymeleaf?

I'm trying to send plain text email from Spring application with Thymeleaf. This is my e-mail service: @Override public void sendPasswordToken(Token token) throws ServiceException { Assert.notNull(token); try { Locale locale =…
jnemecz
  • 3,171
  • 8
  • 41
  • 77
15
votes
2 answers

Sublime 3 - show bad hidden characters

So I recently switched from Sublime 2 to 3 and I can't get it to show some 'bad' characters (like the encoding/pasting) bugs. Why I need it: Sometimes somebody sends me a piece of code (snippet or google analytics code or whatever) via email. I know…
Mordor
  • 485
  • 2
  • 4
  • 14
14
votes
5 answers

What is the most convenient way to convert HTML to plain text while preserving line breaks (with JavaScript)?

Basically I just need the effect of copying that HTML from browser window and pasting it in a textarea element. For example I want this:

Some

text
Some
text
to become this: Some text Some text
Danylo Mysak
  • 1,514
  • 2
  • 16
  • 22
13
votes
1 answer

How to return plain text from flask endpoint? Needed by Prometheus

I need to setup a /metrics endpoint so that Prometheus can consume statistics about an endpoint. How do I go about doing this? I have this in my Flask app: @app.route('/metrics') def metrics(): def generateMetrics(): metrics = "" …
Jwan622
  • 11,015
  • 21
  • 88
  • 181
13
votes
3 answers

AS3 / AIR - Creating a plain text file?

is it possible to create a plain text file with AS3 or AIR? example: i would like to create a plain text file named "MyTextFile.txt", have it contain text that reads "This is my text file." and save it to my desktop. another option would be to have…
Chunky Chunk
  • 16,553
  • 15
  • 84
  • 162
11
votes
1 answer

Intent for editing plain text file with the installed file editor (if any)

I want my app to open a plain text file with any of the file editors installed on my terminal, but I keep getting this exception: ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.EDIT…
Pedriyoo
  • 1,259
  • 4
  • 16
  • 26
11
votes
6 answers

Rendering plain text through PHP

For some reason, I want to serve my robots.txt via a PHP script. I have setup apache so that the robots.txt file request (infact all file requests) come to a single PHP script. The code I am using to render robots.txt is: echo "User-agent:…
JP19
11
votes
6 answers

Convert HTML to plain text in Java

I need to convert HTML to plain text. My only requirement of formatting is to retain new lines in the plain text. New lines should be displayed not only in the case of
but other tags, e.g. ,

leads to a new line too. Sample HTML pages…
brayne
  • 1,355
  • 2
  • 16
  • 27
11
votes
5 answers

Alternative to CSV?

I intend to build a RESTful service which will return a custom text format. Given my very large volumes of data, XML/JSON is too verbose. I'm looking for a row based text format. CSV is an obvious candidate. I'm however wondering if there isn't…
srmark
  • 7,942
  • 13
  • 63
  • 74
11
votes
7 answers

Scalable, fast, text file backed database engine?

I am dealing with large amounts of scientific data that are stored in tab separated .tsv files. The typical operations to be performed are reading several large files, filtering out only certain columns/rows, joining with other sources of data,…
Roman Zenka
  • 3,514
  • 3
  • 31
  • 36
11
votes
2 answers

Formatting a table in a plain text email in C#

I'm trying to send data in a tabular format via email and I was just told that some of our clients can't receive HTML formatted emails, which is what I was using. I tried to manage this using tabs, but the length of the strings varied too much to…
Jeffrey Lott
  • 7,171
  • 6
  • 28
  • 28
11
votes
1 answer

Monospaced Font w/out Syntax Highlighting in Github Flavored Markdown

The title pretty much says it all: I'd like to write a paragraph in monospaced font using GFM, but without any programming language's syntax highlighting. I'd think it would be ```txt or ```text or maybe nothing: ``` But no luck. Is this even…
Caleb P
  • 341
  • 1
  • 2
  • 15
10
votes
4 answers

Rendering Plaintext as HTML maintaining whitespace – without

Given any arbitrary text file full of printable characters, how can this be converted to HTML that would be rendered exactly the same (with the following requirements)? Does not rely on any but the default HTML whitespace rules No
 tag
No CSS…
Alan H.
  • 16,219
  • 17
  • 80
  • 113
10
votes
1 answer

Convert ASCII to plaintext in PHP

I am scraping some sites, and have ASCII text that I want to convert to plain text for storing in a DB. For example I want I have got to tell anyone who will listen that this is one of THE best adventure movies I've ever seen. It's almost…
e_r
  • 794
  • 2
  • 8
  • 18
9
votes
4 answers

How to get a line break in a plain text email RoR?

I'm sending a plain text email and was wondering how I add a line break to this. It's showing up on on the same line. From: <%= @name %> <%= @text %> Thanks
adamwstl
  • 338
  • 3
  • 12
1
2
3
33 34