Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Unexpected behavior of Perl on non-breaking space in Mac environment

by choroba (Cardinal)
on Apr 20, 2022 at 13:53 UTC ( [id://11143127]=note: print w/replies, xml ) Need Help??


in reply to Unexpected behavior of Perl on non-breaking space in Mac environment

Can you reduce the code to a few lines and post them? I fear it's impossible for us to reproduce the described behaviour.
#! /usr/bin/perl use warnings; use strict; use feature qw{ say }; use utf8; my $string = qq(issue: "Problém s\N{NO-BREAK SPACE}odesláním"); binmode *STDOUT, ':encoding(UTF-8)'; say $string;
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Unexpected behavior of Perl on non-breaking space in Mac environment
by hishii2001 (Novice) on Apr 20, 2022 at 14:26 UTC
    I apologize. The input file was a wrong version (my code was grabbing a file from wrong dir), making me think that Perl was converting non-breaking space to "\_". I sincerely apologize for the trouble.
      Suggestion: edit the original post title to have "SOLVED" on the end? (Glad it is, by the way!)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11143127]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (1)
As of 2024-04-18 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found