Take a look at the -C argument for perl and the PERL_UNICODE environment
variable in http://perldoc.perl.org/perlrun.html
Examine the difference between
perl -E 'say "\x{df}"'
and
PERL_UNICODE=O perl -E 'say "\x{df}"'
That said, if you are working with the web, why in the world are you
sending UTF-8? HTML has entities for a reason. I would suggest using
HTML::Entities instead of trying to send non-ASCII characters through who
knows how many layers of things that can screw up UTF-8:
perl -MHTML::Entities -E 'say encode_entities "\x{df}"'
On Tue, Aug 9, 2016 at 7:34 AM hw <[email protected]> wrote:
> Chas. Owens schrieb:
> >
> > On Thu, Jul 28, 2016 at 10:55 AM Paul Johnson <[email protected] <mailto:
> [email protected]>> wrote:
> >
> > On Thu, Jul 28, 2016 at 10:23:19AM -0400, Chas. Owens wrote:
> >
> > snip
> >
> > > Also, this answer on StackOverflow by tchrist (Tom Christiansen,
> who I
> > > would say knows the most about the intersection of Perl and
> Unicode)
> > > is a good resource: http://stackoverflow.com/a/6163129/78259
> >
> > Quite. And utf8::all tries to encapsulate as much of that
> boilerplate
> > as it can.
> >
> >
> > I have always read that answer as a bit of an indictment of the idea of
> "you should be able to load this module and everything will be fine".
> Unicode is complex and trying to treat it like just another list of
> characters is doomed to teeth gnashing and crying. Of course, even
> treating it the way it should be leads to teeth gnashing and crying, but at
> least that will be over the fact the humans suck (we can't even agree on
> where þ should be sorted) as opposed to Perl sucking.
>
> When I have something like
>
>
> print $cgi->p('Gebäudefläche:');
>
>
> in my source, which is correctly displayed everywhere else, I also
> need it correctly displayed in the web browser --- even particularly
> there because that is what the users are looking at.
>
> And that´s all there is to it. It´s really that simple.
>
>