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
146
votes
5 answers

What is the MIME type for Markdown?

Does anyone know if there exists a MIME type for Markdown? I guess it is text/plain, but is there a more specific one?
ilanco
  • 9,581
  • 4
  • 32
  • 37
91
votes
15 answers

Converting HTML to plain text in PHP for e-mail

I use TinyMCE to allow minimal formatting of text within my site. From the HTML that's produced, I'd like to convert it to plain text for e-mail. I've been using a class called html2text, but it's really lacking in UTF-8 support, among other things.…
Justin Stayton
  • 6,031
  • 8
  • 37
  • 43
66
votes
5 answers

Creating user with encrypted password in PostgreSQL

Is it possible to create a user in PostgreSQL without providing the plain text password (ideally, I would like to be able to create a user providing only its password crypted with sha-256) ? What I would like to do is to create a user with something…
Martin
  • 1,868
  • 1
  • 15
  • 20
43
votes
2 answers

Adding line breaks to a text/plain email

I'm having a problem sending a plain text (not HTML!) email, all my line breaks are being ignored: ->setBody('Did you request a password reset for your account?\r\n\r\nIf yes, click here:\r\nhttp://www.website.com', 'text/plain'); The above is…
Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
43
votes
9 answers

Why are plain text passwords bad, and how do I convince my boss that his treasured websites are in jeopardy?

I've always been of the impression that storing passwords in a database as plain text is (as someone else here put it) a Very Bad Thing™. Historically, most of our server-side coding needs have been contracted out to a group of programmers. They…
Zoe
  • 2,129
  • 3
  • 21
  • 33
39
votes
1 answer

How do I encrypt plaintext with GnuPG?

I've been working a great deal with GnuPG lately and have come to depend on its ability to encrypt files, etc. However, I am currently working on a couple of projects that involve communication (i.e. chat,email, etc) where I'd like to use existing…
humble_coder
  • 2,777
  • 7
  • 34
  • 46
36
votes
2 answers

use xsl to output plain text

I needed to use XSL to generate simple plain text output from XML. Since I didn't find any good, concise example online, I decided to post my solution here. Any links referring to a better example would of course be appreciated:
Chris
  • 4,212
  • 5
  • 37
  • 52
30
votes
5 answers

Format a Google Sheets cell in plaintext via Apps Script

Using Google Apps Script, I want to set the format for a Google Sheets cell to plain text. The reason I want to do this is because I want to show a date in the U.S. date format (MM/DD/YYYY). [We can assume the locale in the OP's Google account is…
Anton Pil
  • 329
  • 1
  • 3
  • 7
23
votes
1 answer

HTML vs Plain text as body in email

When creating a Swift_Message you can have both a plain text and an html version of the email. You set one as the body, and then you add the other one as a part. What is the difference if I set the HTML version as body and plain text as part, and…
Svish
  • 152,914
  • 173
  • 462
  • 620
22
votes
10 answers

How to remove duplicate words from a plain text file using linux command

I have a plain text file with words, which are separated by comma, for example: word1, word2, word3, word2, word4, word5, word 3, word6, word7, word3 i want to delete the duplicates and to become: word1, word2, word3, word4, word5, word6,…
cupakob
  • 8,411
  • 24
  • 67
  • 76
20
votes
3 answers

Sending Plain text emails using PHPMailer

I have a problem sending plain text emails using PHPMailer. I have text that I read from a text file and mail it to mail recipient via PHPMailer When the recipient gets the actual email, the formatting of the mail is not like in the text file,…
Elitmiar
  • 35,072
  • 73
  • 180
  • 229
19
votes
5 answers

What is the difference between plaintext and binary data?

Many languages have functions which only process "plaintext", not binary. Does this mean that only characters within the ASCII range will be allowed? Binary is just a series of bytes, isn't it similar to plaintext which is just a series of bytes…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
16
votes
2 answers

Extracting the body of an email from mbox file, decoding it to plain text regardless of Charset and Content Transfer Encoding

I am trying to use Python 3 to extract the body of email messages from a thunderbird mbox file. It is an IMAP account. I would like to have the text part of the body of the email available to process as a unicode string. It should 'look like' the…
DCB
  • 531
  • 1
  • 3
  • 9
16
votes
4 answers

How to convert Html text to plain text in android?

I required convert HTML text to Plain text in String form. String mHtmlString = "<p class="MsoNormal" style="margin-bottom:10.5pt;text-align:justify;line-height: 10.5pt"><b><span style="font-size: 8.5pt;…
Hiren Patel
  • 52,124
  • 21
  • 173
  • 151
16
votes
3 answers

Best practice for resetting forgotten user passwords

As far as I can think, there are two reasonable ways to reset a user's forgotten password. Have the user enter their email address and a new plaintext password is sent to their email address. A link is sent to their email address which has a UID…
Lars
  • 7,908
  • 11
  • 52
  • 70
1
2 3
33 34