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
Lingua::JA::Jtruncate(3) User Contributed Perl Documentation Lingua::JA::Jtruncate(3)

Lingua::JA::Jtruncate - module to truncate Japanese encoded text.

    use Lingua::JA::Jtruncate qw( jtruncate );
    $truncated_jtext = jtruncate( $jtext, $length );

The jtruncate function truncates text to a length $length less than bytes. It is designed to cope with Japanese text which has been encoded using one of the standard encoding schemes - EUC, JIS, and Shift-JIS. It uses the Jcode module to detect what encoding is being used. If the text is none of the above Japanese encodings, the text is just truncated using substr. If it is detected as Japanese text, it tries to truncate the text as well as possible without breaking the multi-byte encoding. It does this by detecting the character encoding of the text, and recursively deleting Japanese (possibly multi-byte) characters from the end of the text until it is underneath the length specified. It should work for EUC, JIS and Shift-JIS encodings.

jtruncate takes some japanese text and a byte length as arguments, and returns the japanese text truncated to that byte length.

    $truncated_jtext = jtruncate( $jtext, $length );

Jcode

<https://github.com/neilb/HTML-Summary>

Originally written by Ave Wrigley (AWRIGLEY), now maintained by Neil Bowers (NEILB).

Copyright (c) 1997 Canon Research Centre Europe (CRE). All rights reserved.

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

2015-10-21 perl v5.32.1

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

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