Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
Striphigh(3)	      User Contributed Perl Documentation	  Striphigh(3)

       Text::Striphigh - Perl extension	to strip the high bit off of
       ISO-8859-1 text.

	 use Text::Striphigh 'striphigh'

	 $SevenBitsText	= striphigh($TextContainingEightBitCharacters);

       The Text::Striphigh module exports a single function: "striphigh". This
       function	takes one argument, a string possibly containing high ASCII
       characters in the ISO-8859-1 character set, and transforms this into a
       string containing only 7	bits ASCII characters, by substituting every
       high bit	character with a similar looking standard ASCII	character, or
       with a sequence of standard ASCII characters.

       Because of precisely the	deficiency this	package	tries to offer a
       workaround for is present in some of the	things that process pod, there
       are no examples in this manpage.	Look at	the source or the test script
       if you want examples.

       If you ever want	to change the striphigh	function yourself, then	don't
       change the one containing the mile long "tr{}{}"	statement that you see
       at first, change	the one	behind the "__DATA__" that's a lot more

       After you've done that, simply run the "" file through perl
       to generate a new version of the	first routine, and in fact of the
       entire file, something like this:

	perl -w >

       Assumes the input text is ISO-8859-1, without even looking at the
       LOCALE settings.

       Some translations are probably less than	optimal.

       People will be offended if you run their	names through this function,
       and print the result on an envelope using an outdated printing device.
       However,	it's probably better than having that printer print a name
       with a high ASCII character in it which happens to be the command to
       set the printer on fire.

       Jan-Pieter Cornet <>

perl v5.32.1			  1997-03-28			  Striphigh(3)


Want to link to this manual page? Use this URL:

home | help