GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MIME::ECOENCODE::FOLD (3)

.ds Aq ’

NAME

MIME::EcoEncode::Fold - folding multi-byte string

CONTENTS

SYNOPSIS



 use MIME::EcoEncode::Fold;
 $folded = mime_eco_fold($str, UTF-8);        # fold utf8 string
 $folded = mime_eco_fold($str, GB2312);       # fold euc-cn string
 $folded = mime_eco_fold($str, EUC-KR);       # fold euc-kr string
 $folded = mime_eco_fold($str, Big5);         # fold big5 string
 $folded = mime_eco_fold($str, Shift_JIS);    # fold cp932 string
 $folded = mime_eco_fold($str, ISO-2022-JP);  # fold 7bit-jis string
 $folded = mime_eco_fold($str, $sbcs);          # $sbcs :
                                                #   single-byte charset
                                                #   (e.g. ISO-8859-1)



DESCRIPTION

This is a module for folding multi-byte string.

When the line of the e-mail text is long, SMTP server may insert line feed code and the multi-byte string might break. This module was written in order to prevent it.

    Options



  $folded = mime_eco_fold($str, $charset, $lf, $bpl);
               # $charset : UTF-8 / GB2312 / EUC-KR / Big5 /
               #            Shift_JIS / ISO-2022-JP / ...
               #            (default: UTF-8)
               #              Note: The others are all folded as
               #                    single-byte string.
               # $lf      : line feed (default: "\n ")
               # $bpl     : bytes per line (default: 990)
               #              Note: 990 is postfixs default.



    Examples

Ex1



  use MIME::EcoEncode::Fold;
  my $str =<<"END";
  This document specifies an Internet standards track protocol for the
  Internet community, and requests discussion and suggestions for
  improvements.
  END
  print mime_eco_fold($str, UTF-8, undef, 50);



Ex1’s output:



  This document specifies an Internet standards trac
   k protocol for the
  Internet community, and requests discussion and su
   ggestions for
  improvements.



SEE ALSO

MIME::EcoEncode

AUTHOR

MURATA Yasuhisa <murata@nips.ac.jp>

COPYRIGHT

Copyright (C) 2013 MURATA Yasuhisa

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MIME::ECOENCODE::FOLD (3) 2013-11-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.