Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Checking in changes prior to tagging of version 0.03. Changelog diff is:

  • Loading branch information...
commit 69b5bc04e9422fb43ddf40f13f829354881f6eba 1 parent 82f5e1d
@miyagawa authored
Showing with 25 additions and 18 deletions.
  1. +1 −0  MANIFEST
  2. +1 −0  Makefile.PL
  3. +23 −18 README
View
1  MANIFEST
@@ -6,6 +6,7 @@ inc/Module/Install/Fetch.pm
inc/Module/Install/Include.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
+inc/Module/Install/ReadmeFromPod.pm
inc/Module/Install/TestBase.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
View
1  Makefile.PL
@@ -1,6 +1,7 @@
use inc::Module::Install;
name 'Encode-DoubleEncodedUTF8';
all_from 'lib/Encode/DoubleEncodedUTF8.pm';
+readme_from 'lib/Encode/DoubleEncodedUTF8.pm';
requires 'Encode', 0.12;
View
41 README
@@ -1,27 +1,32 @@
-This is Perl module Encode::DoubleEncodedUTF8.
+NAME
+ Encode::DoubleEncodedUTF8 - Fix double encoded UTF-8 bytes to the
+ correct one
-INSTALLATION
+SYNOPSIS
+ use Encode;
+ use Encode::DoubleEncodedUTF8;
-Encode::DoubleEncodedUTF8 installation is straightforward. If your CPAN shell is set up,
-you should just be able to do
+ my $string = "\x{5bae}";
+ my $bytes = encode_utf8("\x{5bae}");
+ my $dodgy_utf8 = $string . $bytes; # $bytes is now double encoded
- % cpan Encode::DoubleEncodedUTF8
+ my $fixed = decode("utf-8-de", encode_utf8($dodgy_utf8)); # "\x{5bae}\x{5bae}"
-Download it, unpack it, then build it as per the usual:
+DESCRIPTION
+ Encode::DoubleEncodedUTF8 adds a new encoding "utf-8-de" and fixes
+ double encoded utf-8 bytes found in the original bytes to the correct
+ Unicode entity.
- % perl Makefile.PL
- % make && make test
+ The double encoded utf-8 frequently happens when strings with UTF-8 flag
+ and without are concatenated. See encoding::warnings for details.
-Then install it:
+AUTHOR
+ Tatsuhiko Miyagawa <miyagawa@bulknews.net>
- % make install
+LICENSE
+ This library is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
-DOCUMENTATION
+SEE ALSO
+ encoding::warnings, Test::utf8
-Encode::DoubleEncodedUTF8 documentation is available as in POD. So you can do:
-
- % perldoc Encode::DoubleEncodedUTF8
-
-to read the documentation online with your favorite pager.
-
-Tatsuhiko Miyagawa
Please sign in to comment.
Something went wrong with that request. Please try again.