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  -  LINGUA::ZH::WRAP (3)

.ds Aq ’

NAME

Lingua::ZH::Wrap - Wrap Chinese text

CONTENTS

VERSION

This document describes version 0.03 of Lingua::ZH::Wrap, released July 25, 2004.

SYNOPSIS

    Example 1



    use Lingua::ZH::Wrap;

    $initial_tab = "\t";        # Tab before first line
    $subsequent_tab = "";       # All other lines flush left

    print wrap( $initial_tab, $subsequent_tab, @lines );



    Example 2



    use Lingua::ZH::Wrap qw(wrap $columns $overflow);

    $columns  = 75;             # Change columns
    $overflow = 1;              # Chinese char may occupy 76th col

    print wrap( , , @lines );



DESCRIPTION

Lingua::ZH::Wrap::wrap() is a very simple paragraph formatter. It formats a single paragraph at a time by breaking lines at Chinese character boundries.

Indentation is controlled for the first line ($initial_tab) and all subsequent lines ($subsequent_tab) independently. Please note: $initial_tab and $subsequent_tab are the literal strings that will be used: it is unlikely you would want to pass in a number.

OVERRIDES

Lingua::ZH::Wrap::wrap() has a number of variables that control its behavior.

Lines are wrapped at $Lingua::ZH::Wrap::columns columns; if a Chinese character just extends columns by one byte, it will be wrapped into the next line, unless $Lingua::ZH::Wrap::overflow is set to a true value.

CAVEATS

The algorithm doesn’t care about breaking non-Chinese words. Also, if you pass in strings encoded unicode, it will currently first decode into Big5, do the conversion, then convert back.

Patches are, of course, very welcome; in particular, I’d like to use Lingua::ZH::TaBE to avoid beginning-of-line punctuations, as well as employing other semantic-sensitive formatting techniques.

SEE ALSO

Text::Wrap

AUTHORS

Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Copyright 2003, 2004 by Autrijus Tang <autrijus@autrijus.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See <http://www.perl.com/perl/misc/Artistic.html>

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 LINGUA::ZH::WRAP (3) 2004-07-25

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