Encode-ZapCP1252 0.01 Perl script

SPONSORED LINKS

    Specification

  • Version: 0.01
  • File size: 0 KB
  • File name: Encode-ZapCP1252-0.01.tar.gz
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Perl
  • Company: David Wheeler (View more)

Encode-ZapCP1252 0.01 script description:




Publisher review:
Encode-ZapCP1252 module performs an *in place* conversion of the CP1252 gremlins into appropriate ASCII approximations. This module performs an *in place* conversion of the CP1252 gremlins into appropriate ASCII approximations.< into app you ever been processing a Web form submit, assuming that the incoming text was encoded in ISO-8859-1 (Latin-1), only to end up with a bunch of junk because someone pasted in content from Microsoft Word? Well, this is because Microsoft uses a superset of the Latin-1 encoding called "Windows Western" or "CP1252". So mostly things will come out right, but a few things--like curly quotes, m-dashes, elipses, and the like--will not. The differences are well-known; you see a nice chart at documenting the differences on Wikipedia: .

Of course, that won't really help you. What will help you is to quit using Latin-1 and switch to UTF-8. Then you can just convert from CP1252 to UTF-8 without losing a thing, just like this: use Encode; $text = decode('cp1252', $text, 1);But I know that there are those of you out there stuck with Latin-1 and who don't want any junk charactrs from Word users, and that's where this module comes in. It will zap those CP1252 gremlins for you, turning them into their appropriate UTF-8 approximations.

Usage

This module exports a single subroutine: "zap_cp1252()". You use it like this zap_cp1252($text); This subroutine performs an *in place* conversion of the CP1252 gremlins into appropriate ASCII approximations.

Note that because the conversion happens in place, the data to be converted *cannot* be a string constant; it must be a scalar variable.
Encode-ZapCP1252 0.01 is a Perl script for Modules scripts design by David Wheeler. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5