{
    "content": [
        {
            "type": "text",
            "text": "# Unicode::MapUTF8 (perldoc)\n\n## NAME\n\nUnicode::MapUTF8 - Conversions to and from arbitrary character sets and UTF8\n\n## SYNOPSIS\n\nuse Unicode::MapUTF8 qw(toutf8 fromutf8 utf8supportedcharset);\n# Convert a string in 'ISO-8859-1' to 'UTF8'\nmy $output = toutf8({ -string => 'An example', -charset => 'ISO-8859-1' });\n# Convert a string in 'UTF8' encoding to encoding 'ISO-8859-1'\nmy $other  = fromutf8({ -string => 'Other text', -charset => 'ISO-8859-1' });\n# List available character set encodings\nmy @charactersets = utf8supportedcharset;\n# Add a character set alias\nutf8charsetalias({ 'ms-japanese' => 'sjis' });\n# Convert between two arbitrary (but largely compatible) charset encodings\n# (SJIS to EUC-JP)\nmy $utf8string   = toutf8({ -string =>$sjisstring, -charset => 'sjis'});\nmy $eucjpstring = fromutf8({ -string => $utf8string, -charset => 'euc-jp' })\n# Verify that a specific character set is supported\nif (utf8supportedcharset('ISO-8859-1') {\n# Yes\n}\n\n## DESCRIPTION\n\nProvides an adapter layer between core routines for converting to and from UTF8 and other\nencodings. In essence, a way to give multiple existing Unicode modules a single common interface\nso you don't have to know the underlaying implementations to do simple UTF8 to-from other\ncharacter set encoding conversions. As such, it wraps the Unicode::String, Unicode::Map8,\nUnicode::Map and Jcode modules in a standardized and simple API.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CHANGES**\n- **FUNCTIONS** (4 subsections)\n- **VERSION**\n- **TODO**\n- **SEE ALSO**\n- **COPYRIGHT**\n- **AUTHOR**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Unicode::MapUTF8",
        "section": "",
        "mode": "perldoc",
        "summary": "Unicode::MapUTF8 - Conversions to and from arbitrary character sets and UTF8",
        "synopsis": "use Unicode::MapUTF8 qw(toutf8 fromutf8 utf8supportedcharset);\n# Convert a string in 'ISO-8859-1' to 'UTF8'\nmy $output = toutf8({ -string => 'An example', -charset => 'ISO-8859-1' });\n# Convert a string in 'UTF8' encoding to encoding 'ISO-8859-1'\nmy $other  = fromutf8({ -string => 'Other text', -charset => 'ISO-8859-1' });\n# List available character set encodings\nmy @charactersets = utf8supportedcharset;\n# Add a character set alias\nutf8charsetalias({ 'ms-japanese' => 'sjis' });\n# Convert between two arbitrary (but largely compatible) charset encodings\n# (SJIS to EUC-JP)\nmy $utf8string   = toutf8({ -string =>$sjisstring, -charset => 'sjis'});\nmy $eucjpstring = fromutf8({ -string => $utf8string, -charset => 'euc-jp' })\n# Verify that a specific character set is supported\nif (utf8supportedcharset('ISO-8859-1') {\n# Yes\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "CHANGES",
                "lines": 47,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "utf8_charset_alias",
                        "lines": 42
                    },
                    {
                        "name": "utf8_supported_charset",
                        "lines": 17
                    },
                    {
                        "name": "to_utf8",
                        "lines": 2
                    },
                    {
                        "name": "from_utf8",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "TODO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 19,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Unicode::MapUTF8 - Conversions to and from arbitrary character sets and UTF8\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Unicode::MapUTF8 qw(toutf8 fromutf8 utf8supportedcharset);\n\n# Convert a string in 'ISO-8859-1' to 'UTF8'\nmy $output = toutf8({ -string => 'An example', -charset => 'ISO-8859-1' });\n\n# Convert a string in 'UTF8' encoding to encoding 'ISO-8859-1'\nmy $other  = fromutf8({ -string => 'Other text', -charset => 'ISO-8859-1' });\n\n# List available character set encodings\nmy @charactersets = utf8supportedcharset;\n\n# Add a character set alias\nutf8charsetalias({ 'ms-japanese' => 'sjis' });\n\n# Convert between two arbitrary (but largely compatible) charset encodings\n# (SJIS to EUC-JP)\nmy $utf8string   = toutf8({ -string =>$sjisstring, -charset => 'sjis'});\nmy $eucjpstring = fromutf8({ -string => $utf8string, -charset => 'euc-jp' })\n\n# Verify that a specific character set is supported\nif (utf8supportedcharset('ISO-8859-1') {\n# Yes\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Provides an adapter layer between core routines for converting to and from UTF8 and other\nencodings. In essence, a way to give multiple existing Unicode modules a single common interface\nso you don't have to know the underlaying implementations to do simple UTF8 to-from other\ncharacter set encoding conversions. As such, it wraps the Unicode::String, Unicode::Map8,\nUnicode::Map and Jcode modules in a standardized and simple API.\n\nThis also provides general character set conversion operation based on UTF8 - it is possible to\nconvert between any two compatible and supported character sets via a simple two step chaining\nof conversions.\n\nAs with most things Perlish - if you give it a few big chunks of text to chew on instead of lots\nof small ones it will handle many more characters per second.\n\nBy design, it can be easily extended to encompass any new charset encoding conversion modules\nthat arrive on the scene.\n\nThis module is intended to provide good Unicode support to versions of Perl prior to 5.8. If you\nare using Perl 5.8.0 or later, you probably want to be using the Encode module instead. This\nmodule does work with Perl 5.8, but Encode is the preferred method in that environment.\n",
                "subsections": []
            },
            "CHANGES": {
                "content": "1.14 2020.09.27 Fixing POD breakage in EUC-JP version of POD\n\n1.13 2020.09.27 Fixing MANIFEST.SKIP error\n\n1.12 2020.09.27 Build tool updates. Maintainer updates. POD error fixes. Relicensed under MIT\nlicense.\n\n1.11 2005.10.10 Documentation changes. Addition of Build.PL support. Added various build tests,\nLICENSE, ArtisticLicense.txt, GPLLicense.txt. Split documentation into seperate .pod file.\nAdded Japanese translation of POD.\n\n1.10 2005.05.22 - Fixed bug in conversion of ISO-2022-JP to UTF-8. Problem and fix found by\nMasahiro HONMA <masahiro.honma@tsutaya.co.jp>.\n\nSimilar bugs in conversions of shiftjis and euc-jp\nto UTF-8 corrected as well.\n\n1.09 2001.08.22 - Fixed multiple typo occurances of 'uft' where 'utf' was meant in code. Problem\naffected utf16 and utf7 encodings. Problem found by devon smith <devon@taller.PSCL.cwru.edu>\n\n1.08 2000.11.06 Added 'utf8charsetalias' function to allow for runtime setting of character\nset aliases. Added several alternate names for 'sjis' (shiftjis, shift-jis, shiftjis, s-jis,\nand sjis).\n\nCorrected 'croak' messages for 'fromutf8' functions to\nappropriate function name.\n\nCorrected fatal problem in jcode-unicode internals. Problem\nand fix found by Brian Wisti <wbrian2@uswest.net>.\n\n1.07 2000.11.01 Added 'croak' to use Carp declaration to fix error messages. Problem and fix\nfound by <wbrian2@uswest.net>.\n\n1.06 2000.10.30 Fix to handle change in stringification of overloaded objects between Perl 5.005\nand 5.6. Problem noticed by Brian Wisti <wbrian2@uswest.net>.\n\n1.05 2000.10.23 Error in conversions from UTF8 to multibyte encodings corrected\n\n1.04 2000.10.23 Additional diagnostic error messages added for internal errors\n\n1.03 2000.10.22 Bug fix for load time Unicode::Map encoding detection\n\n1.02 2000.10.22 Bug fix to 'fromutf8' method and load time detection of Unicode::Map8 supported\ncharacter set encodings\n\n1.01 2000.10.02 Initial public release\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "utf8_charset_alias",
                        "content": "Used for runtime assignment of character set aliases.\n\nCalled with no parameters, returns a hash of defined aliases and the character sets they map\nto.\n\nExample:\n\nmy $aliases     = utf8charsetalias;\nmy @aliasnames = keys %$aliases;\n\nIf called with ONE parameter, returns the name of the 'real' charset if the alias is\ndefined. Returns undef if it is not found in the aliases.\n\nExample:\n\nif (! utf8charsetalias('VISCII')) {\n# No alias for this\n}\n\nIf called with a list of 'alias' => 'charset' pairs, defines those aliases for use.\n\nExample:\n\nutf8charsetalias({ 'japanese' => 'sjis', 'japan' => 'sjis' });\n\nNote: It will croak if a passed pair does not map to a character set defined in the\npredefined set of character encoding. It is NOT allowed to alias something to another alias.\n\nMultiple character set aliases can be set with a single call.\n\nTo clear an alias, pass a character set mapping of undef.\n\nExample:\n\nutf8charsetalias({ 'japanese' => undef });\n\nWhile an alias is set, the 'utf8supportedcharset' function will return the alias as if it\nwere a predefined charset.\n\nOverriding a base defined character encoding with an alias will generate a warning message\nto STDERR.\n"
                    },
                    {
                        "name": "utf8_supported_charset",
                        "content": "Returns true if the named charset is supported (including user defined aliases).\n\nReturns false if it is not.\n\nExample:\n\nif (! utf8supportedcharset('VISCII')) {\n# No support yet\n}\n\nIf called in a list context with no parameters, it will return a list of all supported\ncharacter set names (including user defined aliases).\n\nExample:\n\nmy @charsets = utf8supportedcharset;\n"
                    },
                    {
                        "name": "to_utf8",
                        "content": "Returns the string converted to UTF8 from the specified source charset.\n"
                    },
                    {
                        "name": "from_utf8",
                        "content": "Returns the string converted from UTF8 to the specified target charset.\n"
                    }
                ]
            },
            "VERSION": {
                "content": "1.14 2020.09.27\n",
                "subsections": []
            },
            "TODO": {
                "content": "Regression tests for Jcode, 2-byte encodings and encoding aliases\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Unicode::String Unicode::Map8 Unicode::Map Jcode Encode\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2000-2020, Jerilyn Franz. All rights reserved.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Jerilyn Franz <cpan@jerilyn.info>\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "MIT License\n\nCopyright (c) 2020 Jerilyn Franz\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software\nand associated documentation files (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or\nsubstantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\nBUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
                "subsections": []
            }
        }
    }
}