Tian haili @ csdn
2012-07-31
The mime (multipurposeinternet Mail Extensions) is used when an email is uploaded or transmitted over the network ). Mail transmission can only deliver US-ASCII characters, and other characters in the mail must be converted by a certain amount of encoding before transmission. For emails whose subject or/and attachment names are Chinese characters, some email systems may encounter garbled characters due to the lack of encoding (character encoding and Transmission Enc
C language Isprint () function: To determine whether a character is a printable characterheader file:
#include
The Isprint () function is used to determine whether a character is a printed character, and its prototype is:
int isprint (int c);
"Parameter" C is the character that needs to be detected.
' Return value ' If C is a printable character, returns a value other than 0,
Tags: HTTP Io ar use for SP file data Art
The quote-printable (qP) method is usually abbreviated as "Q". The principle isThe 8-bit character is represented by two hexadecimal values, and "=" is added to the front ". So we can see that it is encoded by QP.The following file is usually like this: = B3 = C2 = BF = A1 = C7 = E5 = a3 = ac = C4 = fa = BA = C3 = a3 = A1.Quoted-printable encryption rules (RFC 1341
This article is collected and collated by www.169it.comIf a C string contains both printable and non-printable characters, if you want to write the string to a file, and it is convenient to open the file view or print it in the console without garbled characters, you can convert the non-printable character in the string to 16 binary, here is a function to use:
recommended: More Linux file Lookup and comparison commands attention: Linux commands DaquanThe strings command looks for printable strings in an object file or in a binary file. A string is any sequence of 4 or more printable characters, ending with a newline or null character. The strings command is useful for identifying random object files.GrammarFile ...]Options-A--all: scans the entire file instead of
C/C ++ string encryption: printable text encryption; string printing text
Today, we developed a text encryption algorithm. Because it is based on the algorithm's confidentiality and has no key, it can only meet the security requirements,
As follows:
Article 1201411210H0g // 60609.820Ciphertext 1{*
Article 2201411210ab1234/32d fdsCiphertext 2S "4 HVgy) 9J [o} 0 EPgs #35 ^ FxaEncrypt a row of data each time !!Hope you like it
// StrOut must be
visible characters. The best way to do this is to do an extension to support the delivery of binary files without changing the traditional protocol. The non-printable characters can also be printed with printable characters, the problem is solved. Base64 coding comes into being, Base64 is a representation method of binary data based on 64 printable characters.
The browser cannot resolve JSON data that contains a printable string, and an error is available.
ASCII Character code Introduction: http://www.jb51.net/shouce/autoit3/source/html/appendix/ascii.htm
Processing method: To find the printable characters, and replace the printable characters can be.
The code is as follows:
/** * @author Mr * @since 2017/1/5 * @para
Quoted-printable is also one of the common encoding methods in mime mail. Like base64, it also encodes the input string or data into printable ASCII strings.
Quoted-printable: the input data is in the range of 33-60 and 62-126 and is directly output; others must be encoded as "=" plus two bytes of hex code (uppercase ). To ensure that the output line does not exc
Original article:Http://www.cnblogs.com/jerrie/archive/2006/07/29/462798.html#commentform
Today, we finally completed the sending and receiving of emails with jmail. Although not satisfied, the basic functions can be implemented. During the process, we also encountered many problems, such as decoding and unread emails.Email decoding is generally divided into base64 and quoted-printable. I have searched the internet, but I have not found Version C # (m
Today made a text encryption algorithm, because this algorithm is based on algorithm secrecy, no secret key, all can only meet the requirements of low security requirements,Strout must be 0x20 for printable characters--0x7f//strout must end with '/',//encryption works better by sols//encryption result as printable character 0x20--0x7fvoid encodestr (char *strout) {int Randoffset = rand ()%96;int reschar; in
Non-printable characters
There are many useful non-printable characters that must be used occasionally. The following table lists escape sequences used to indicate non-printable characters:
Character
Description
\ CX
MatchingXThe specified control character. For example, \ cM matches a Control-M or carriage return character.XMust be a A-Z
Create a printable Chinese Database and print a Chinese Database
Generally, the encoding type of data in a database isLatinl,This does not support Chinese Characters
The Chinese character encoding isUTF-8AndGbk
To enable the tables in the database to display Chinese characters, you must specify the character encoding when creating the database.
1 create database bb charset = utf8;
Or
1 1 create database bb charset = gbk;
A database called bb is
Copy codeThe Code is as follows: # using System;
# Using System. Collections;
# Using System. Text;
#
# // # // Class for encoding and decoding a string to QuotedPrintable
# // RFC 1521 http://www.ietf.org/rfc/rfc1521.txt
# // RFC 2045 http://www.ietf.org/rfc/rfc2045.txt
# // Date: 2006-03-23
# // Author: Kevin Spaun
# // Company: SPAUN Informationstechnik GmbH-http://www.spaun-it.com/
# // Feedback: kspaun@spaun-it.de
# // License: This piece of code comes with no guaranties. You can use it for
print visual data for an array Package hold the object. iterators; Import java.util.Arrays; Public class Test { publicstaticvoid main (string[] args) { int [] i = {A-i}; = {{"1", "2"},{"2"}}; System.out.println (i); System.out.println (s); System.out.println (arrays.tostring (i)); System.out.println (arrays.tostring (s)); System.out.println (arrays.tostring (s[0]));} }Output Result:[ email protected][[ljava.lang.string;@4
In many cases, the content extracted from a web page contains many special escape characters.Entity name, Or yesEntity Encoding, Such
Display
Description
Entity name
Entity ID
Blank
ENSP;
#8194;
Wide white space
Amp; emsp;
#8195;
Blank rows
Nbsp;
#160;
Less
Lt;
#60;
>
Greater
Gt;
#62;
Symbol
Amp;
#38;
"
Double quotation marks
Quot;
The quopri and base64 modules are both used for encoding and decoding, and base64 and quoted-printable are both common encodings in emails.
Quoted-printable: The English character is not processed except =. The other characters are encoded as = The hexadecimal number of the two bytes that contain this character. "=/R/N" is available at the end of the row ".
The quopri module only needs to use its encode, d
Cleverly use CSS to create printable pages and css to create and print
Creating a printed page with CSS saves some effort without having to create an HTML file for printing. The premise is to use CSS + DIV to layout HTML pages according to "WEB standards.First, add the CSS file set for the printer to the HTML page.
Media = "screen" is screen-oriented;
Media = "print", which is print-oriented;2. Create a printed page to remove unnecessary page element
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.