Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^3: Mixed Unicode and ANSI string comparisons?

by exilepanda (Pilgrim)
on Dec 17, 2015 at 08:28 UTC ( #1150600=note: print w/replies, xml ) Need Help??

in reply to Re^2: Mixed Unicode and ANSI string comparisons?
in thread Mixed Unicode and ANSI string comparisons?

#! /usr/bin/perl is useless in windows ( and wrong path here )

Your code don't need that complex. Follow code works as well

use warnings; use strict; use utf8; use feature "say"; binmode STDOUT, ":utf8"; my $unicodeStr = "..."; # assign your own Unicode char as I can't type + Unicode in here say for sort ($uniCodeStr, "user login" ) ;
One problem is that, when you run the script inside a CMD console, it's default code page is ANSI, but whatever codepage you set (chcp) , you will not able to print a proper result ( from my experience ).

To print a proper result, you might want to use tools like PowerShell or NppExec(a plugin) with Notepad++ ( you also have to set the output encoding for this plugin )

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2020-02-21 13:08 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (95 votes). Check out past polls.