is consulted. If that fails, "latin1" (ISO 8859-1) is assumed.
If no encoding can be found, C<Unknown encoding '...'> error will be thrown.
-=head1 FUTURE POSSIBILITIES
+=head1 KNOWN PROBLEMS
The C<\x..> and C<\0...> in regular expressions are not affected by
-this pragma. They probably should.
-
-The charnames "\N{...}" does not work with this pragma.
-
-=head1 KNOWN PROBLEMS
+this pragma. They very probably should.
-Cannot be combined with C<use utf8>. Note that this is a problem
-B<only> if you would like to have Unicode identifiers in your scripts.
-You should not need C<use utf8> for anything else these days
-(since Perl 5.8.0).
+The charnames pragma ("\N{LATIN SMALL SHARP LETTER S}") does not work
+with this pragma.
=head1 SEE ALSO
needed>.
You can also use the C<encoding> pragma to change the default encoding
-of the data in your script; see L<encoding>. Currently this cannot
-be combined with C<use utf8>.
+of the data in your script; see L<encoding>.
=back
SV *filter_state = 0;
SV *filter_sub = 0;
SV *hook_sv = 0;
+ SV *encoding;
+ OP *op;
sv = POPs;
if (SvNIOKp(sv)) {
PL_eval_owner = thr;
MUTEX_UNLOCK(&PL_eval_mutex);
#endif /* USE_5005THREADS */
- return DOCATCH(doeval(gimme, NULL));
+
+ /* Store and reset encoding. */
+ encoding = PL_encoding;
+ PL_encoding = Nullsv;
+
+ op = DOCATCH(doeval(gimme, NULL));
+
+ /* Restore encoding. */
+ PL_encoding = encoding;
+
+ return op;
}
PP(pp_dofile)