Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

encode::mime::header(3) [centos man page]

Encode::MIME::Header(3) 				User Contributed Perl Documentation				   Encode::MIME::Header(3)

NAME
Encode::MIME::Header -- MIME 'B' and 'Q' header encoding SYNOPSIS
use Encode qw/encode decode/; $utf8 = decode('MIME-Header', $header); $header = encode('MIME-Header', $utf8); ABSTRACT
This module implements RFC 2047 Mime Header Encoding. There are 3 variant encoding names; "MIME-Header", "MIME-B" and "MIME-Q". The difference is described below decode() encode() ---------------------------------------------- MIME-Header Both B and Q =?UTF-8?B?....?= MIME-B B only; Q croaks =?UTF-8?B?....?= MIME-Q Q only; B croaks =?UTF-8?Q?....?= DESCRIPTION
When you decode(=?encoding?X?ENCODED WORD?=), ENCODED WORD is extracted and decoded for X encoding (B for Base64, Q for Quoted-Printable). Then the decoded chunk is fed to decode(encoding). So long as encoding is supported by Encode, any source encoding is fine. When you encode, it just encodes UTF-8 string with X encoding then quoted with =?UTF-8?X?....?= . The parts that RFC 2047 forbids to encode are left as is and long lines are folded within 76 bytes per line. BUGS
It would be nice to support encoding to non-UTF8, such as =?ISO-2022-JP? and =?ISO-8859-1?= but that makes the implementation too complicated. These days major mail agents all support =?UTF-8? so I think it is just good enough. Due to popular demand, 'MIME-Header-ISO_2022_JP' was introduced by Makamaka. Thre are still too many MUAs especially cellular phone handsets which does not grok UTF-8. SEE ALSO
Encode RFC 2047, <http://www.faqs.org/rfcs/rfc2047.html> and many other locations. perl v5.16.3 2013-04-29 Encode::MIME::Header(3)

Check Out this Related Man Page

Encode::MIME::Header(3pm)				User Contributed Perl Documentation				 Encode::MIME::Header(3pm)

NAME
Encode::MIME::Header -- MIME 'B' and 'Q' header encoding SYNOPSIS
use Encode qw/encode decode/; $utf8 = decode('MIME-Header', $header); $header = encode('MIME-Header', $utf8); ABSTRACT
This module implements RFC 2047 Mime Header Encoding. There are 3 variant encoding names; "MIME-Header", "MIME-B" and "MIME-Q". The difference is described below decode() encode() ---------------------------------------------- MIME-Header Both B and Q =?UTF-8?B?....?= MIME-B B only; Q croaks =?UTF-8?B?....?= MIME-Q Q only; B croaks =?UTF-8?Q?....?= DESCRIPTION
When you decode(=?encoding?X?ENCODED WORD?=), ENCODED WORD is extracted and decoded for X encoding (B for Base64, Q for Quoted-Printable). Then the decoded chunk is fed to decode(encoding). So long as encoding is supported by Encode, any source encoding is fine. When you encode, it just encodes UTF-8 string with X encoding then quoted with =?UTF-8?X?....?= . The parts that RFC 2047 forbids to encode are left as is and long lines are folded within 76 bytes per line. BUGS
It would be nice to support encoding to non-UTF8, such as =?ISO-2022-JP? and =?ISO-8859-1?= but that makes the implementation too complicated. These days major mail agents all support =?UTF-8? so I think it is just good enough. Due to popular demand, 'MIME-Header-ISO_2022_JP' was introduced by Makamaka. Thre are still too many MUAs especially cellular phone handsets which does not grok UTF-8. SEE ALSO
Encode RFC 2047, <http://www.faqs.org/rfcs/rfc2047.html> and many other locations. perl v5.14.2 2011-08-09 Encode::MIME::Header(3pm)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How Many "Falling Unix Commands" are in the Flash Header?

(7 Replies)
Discussion started by: Neo
7 Replies

2. Shell Programming and Scripting

Loop through file and write out lines to file(s)

Hi, I am new to ksh scripting so your help will be much appreciated. I have a file called file.txt which looks like this Header 20050702 20050703 ABC DEF Header 20050703 20050704 123 456 Header 20050704 20050705 XXX YYY What I am trying to do is write out each of the record... (7 Replies)
Discussion started by: Jtrinh
7 Replies

3. UNIX for Dummies Questions & Answers

Adding header to an existing file

Dear All, I need to add a header of one line to an already existing file. I know that it can be achieved by the following: echo "Header" > newfile cat file1 >> newfile But my problem is that file is huge and there is no space for creating a new file every time. Is there a way that I can... (5 Replies)
Discussion started by: shash
5 Replies

4. Shell Programming and Scripting

Help with Perl Module

I dont know if this is a dumb question, but I am unable to move ahead and need help - There is a perl module called Header.pm which was written by someone else. I am trying to write a simple perl script which uses a function provided by the module. The function has been exported by the module... (9 Replies)
Discussion started by: NewDeb
9 Replies

5. Shell Programming and Scripting

Remove spaces between file names

Hi All, I have spaces in between file names. "Material Header.txt" "Customer Header.txt" "Vendor Header.txt" And how can I remove spaces between file names like below MaterialHeader.txt CustomerHeader.txt VendorHeader.txt Thanks Srimitta (10 Replies)
Discussion started by: srimitta
10 Replies

6. Programming

Help to decode in perl script

Hi, I am having a file in below stucture: header { subheader1 { field1 : value field2 : value field3: value } //end of subheader1 subheader2 { subheader3 { field4 : value field5 : value field6: value } subheader4 (6 Replies)
Discussion started by: kallol
6 Replies

7. Shell Programming and Scripting

Removing Header & Trailer from a file

Hi All, I am karthik. I am new to this forum. I have one requirement. I have a file with header and footer. Header may be like HDR0001 or FILE20090110 (Assume it is unknown so far, but i am sure there is a header in the file) likewise file has the trailer too. I just... (7 Replies)
Discussion started by: karthi_gana
7 Replies

8. Shell Programming and Scripting

How to find the file encoding and updating the file encoding?

Hi, I am beginner to Unix. My requirement is to validate the encoding used in the incoming file(csv,txt).If it is encoded with UTF-8 format,then the file should remain as such otherwise i need to chnage the encoding to UTF-8. Please advice me how to proceed on this. (7 Replies)
Discussion started by: cnraja
7 Replies

9. Shell Programming and Scripting

Specific Header after every 30 records

Hi All, I have got a requirement. I have a source file, EMPFULL.txt and I need to split the data for every 30 records and place a Typical Header as below with system and page number too. 2012.01.03 Employee Dept Report 1... (6 Replies)
Discussion started by: srk409
6 Replies

10. Shell Programming and Scripting

If condition satisfies print the column header

Dear All, Good Day. I would like to solve the following issue and got some strange results, if anyone could help me in this regard, you are most welcome. Here is the problem: I have a file like Header Value1 Value2 Value3 Value4 Value5 Value6 ... Value9 12.144 6 5 ... (8 Replies)
Discussion started by: Fredrick
8 Replies

11. UNIX for Dummies Questions & Answers

Header of Ls -la

Hi All, It might sounds an easy job but i need to know - How to get header information of ls -la ? (8 Replies)
Discussion started by: vinil
8 Replies

12. Shell Programming and Scripting

Sort without Header and Trailer

Hi , My UNIX system is SUN Solaris. I am trying to do a simple thing as described below. I have a PIPE delimited file that has header and trailer. So the file is something like below: Test1.txt looks like something below: field_data1|field_data2|and some more data --Header ... (5 Replies)
Discussion started by: Saanvi1
5 Replies

13. Shell Programming and Scripting

Adding Leading Zeros for date in a file

Hello, I have a pipe separated file with two major lines. One is header and another is detail line. Header starts with H and Detail start with D. Sample Content: H|123456|Joes Watson|UK|4/5/2016|12/5/2016|3456|HC|NW|||||| D|123456|Joes... (13 Replies)
Discussion started by: Mannu2525
13 Replies

14. UNIX for Beginners Questions & Answers

Create HTML with Header and assign values

Hi All Below is the output i have from my code 10.106.86.93 A1,A2,A2,A3,A3,A4,A5,A6,B1,B2,B3,B4,B5,B5,B6,B6,C1,C1,C2,C2,C3,C3,C4,C4,C5,C5,C6,D1,D2,D3,D4,D5,D6,D6 3 Need to create a html with header and for the last value (3) if it is 3 then it should print ok, if 4 then print NotOk ... (4 Replies)
Discussion started by: Snehasish
4 Replies