quoted-printable

Java: Encode String in quoted-printable

青春壹個敷衍的年華 提交于 2019-12-31 04:51:09
问题 I am looking for a way to quoted-printable encode a string in Java just like php's native quoted_printable_encode() function. I have tried to use JavaMails's MimeUtility library. But I cannot get the encode(java.io.OutputStream os, java.lang.String encoding) method to work since it is taking an OutputStream as input instead of a String (I used the function getBytes() to convert the String) and outputs something that I cannot get back to a String (I'm a Java noob :) Can anyone give me tips on

Remove `=\n` from html

喜夏-厌秋 提交于 2019-12-25 12:42:11
问题 I have a RoundCube plugin that writes the message body to the database and after that I need to parse the data into another table. By using certain functions in RoundCube I am able to remove all html tags and a </td> is replaced by '\n' and </tr> is replaced by '\n\n'. This make the parsing of my data very easy and robust. There is only one drawback, the html data are broken into fix lines with an = at the end, e.g.: <td valign=3D"bottom" style=3D"color:#444444;padding:5px 10px 5= px 0px;font

Decoding quoted-printable messages in Swift

非 Y 不嫁゛ 提交于 2019-12-23 12:38:55
问题 I have a quoted-printable string such as "The cost would be =C2=A31,000". How do I convert this to "The cost would be £1,000". I'm just converting text manually at the moment and this doesn't cover all cases. I'm sure there is just one line of code that will help with this. Here is my code: func decodeUTF8(message: String) -> String { var newMessage = message.stringByReplacingOccurrencesOfString("=2E", withString: ".", options: NSStringCompareOptions.LiteralSearch, range: nil) newMessage =

decoding quoted-printables

廉价感情. 提交于 2019-12-18 07:44:52
问题 I am looking for a way to decode quoted-printables. The quoted-printables are for arabic characters and look like this: =D8=B3=D8=B9=D8=A7=D8=AF I need to convert it to a string, and store it or display.. I've seen post on stackoverflow for the other way around (encoding), but couldn't find decoding. 回答1: Uhm, it's a little hacky but you could replace the = characters with a % character and use NSString's stringByReplacingPercentEscapesUsingEncoding: method. Otherwise, you could essentially

decoding quoted-printables

对着背影说爱祢 提交于 2019-12-18 07:44:32
问题 I am looking for a way to decode quoted-printables. The quoted-printables are for arabic characters and look like this: =D8=B3=D8=B9=D8=A7=D8=AF I need to convert it to a string, and store it or display.. I've seen post on stackoverflow for the other way around (encoding), but couldn't find decoding. 回答1: Uhm, it's a little hacky but you could replace the = characters with a % character and use NSString's stringByReplacingPercentEscapesUsingEncoding: method. Otherwise, you could essentially

decode a quoted printable message in php

风格不统一 提交于 2019-12-17 17:12:42
问题 I have the string which that encoded in quoted-printable. How do I decode this in php? Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum felis = pede, vestibulum et, ullamcorper in, ultrices eget, metus. Suspendisse in n= ulla. Sed justo. Donec dapibus auctor neque. Pellentesque faucibus ante nec= metus. Vivamus feugiat, velit rhoncus semper suscipit, libero augue venena= tis leo, nec ornare nulla elit eget diam. Nullam sollicitudin. 回答1: This should help: quoted_printable

What type of encoding is being used?

爱⌒轻易说出口 提交于 2019-12-13 18:19:22
问题 I am currently making a program in which one of its functions is to extract the HTML part of a Multipart email. I have accomplished that task fine however there is a type of encoding on some of the characters that I can't seem to figure out e.g. ',' into '=2C' ';' into '=3B' '=' into '=3D' and it also puts random '=' all over the place. Does anyone know if there is a decoder for this (or even what the name of it is)? I have replaced a few things with code, however there are probably plenty

Objective-C decode quoted printable text

元气小坏坏 提交于 2019-12-11 03:36:27
问题 Is there any efficient (for text files > 5MB) quoted printable decoder written in C? I need such a decoder in an iOS project. At the meanwhile I am using a high level decoder which is way too slow. It takes up to 10 minutes on device to decode a 5MB file: - (NSString *)decodedQuotedPrintable:(NSString *)string { NSMutableString *decodedString = string.mutableCopy; [decodedString replaceOccurrencesOfString:@"=\r\n" withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(0,

Python - How to extract URLs (plain/html, quote-printable/base64/7bit) from an email file

此生再无相见时 提交于 2019-12-04 13:57:51
问题 I have searched in many places but I haven't come across a logic/script that extracts the URLs from the emails properly. So, I am presenting what I came up with. This is working perfectly for me. This can handle plain-text and html-text content-types, supports quoted-printable, base64, and 7bit encodings. NOTE : I wrote this as part of another task, you may have to tweak it to suit your need. Post any questions, and I can help answer. Modules to import for this to work: import traceback

Python - How to extract URLs (plain/html, quote-printable/base64/7bit) from an email file

若如初见. 提交于 2019-12-03 20:40:14
I have searched in many places but I haven't come across a logic/script that extracts the URLs from the emails properly. So, I am presenting what I came up with. This is working perfectly for me. This can handle plain-text and html-text content-types, supports quoted-printable, base64, and 7bit encodings. NOTE : I wrote this as part of another task, you may have to tweak it to suit your need. Post any questions, and I can help answer. Modules to import for this to work: import traceback import BeautifulSoup import re from sets import Set import email import quopri, base64 Here are the APIs I