A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://perldoc.perl.org/source::encoding below:

source::encoding -- Declare Perl source code encoding

CONTENTS #NAME

source::encoding -- Declare Perl source code encoding

#SYNOPSIS
use source::encoding 'ascii';
use source::encoding 'utf8';
no source::encoding;
#DESCRIPTION

These days, Perl code either generally contains only ASCII characters with \x{} and similar escapes to represent non-ASCII, or use utf8 is used to indicate that the source code itself contains characters encoded as UTF-8.

That means that a character in the source code not meeting these criteria is often a typographical error. This pragma is used to tell Perl to raise an error when this happens.

use source::encoding 'utf8' is a synonym for use utf8. They may be used interchangeably.

use source::encoding 'ascii' turns off any UTF-8 expectations, and raises a fatal error if any character within its scope in the input source code is not ASCII (or ASCII-equivalent on EBCDIC systems).

no source::encoding turns off any UTF-8/ASCII expectations for the remainder of its scope. The meaning of non-ASCII characters is then undefined.

use source::encoding 'ascii' is automatically enabled within the lexical scope of a use v5.41.0 or higher.

#SEE ALSO

utf8


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4