in reply to Re: Mixed Unicode and ANSI string comparisons?
in thread Mixed Unicode and ANSI string comparisons?
What have you tried?
Nothing! I know just enough about Unicrap to know that I want nothing to do with it.
But something came up. Hence; I'm asking for expert help.
#! /usr/bin/perl use warnings; use strict; use feature qw{ say }; use open OUT => ':utf8', ':std'; use Encode; my @strings = ("\N{LATIN SMALL LETTER C WITH CARON}", "c", "\N{LATIN SMALL LETTER C WITH CEDILLA}", "\N{LATIN SMALL LETTER C WITH ACUTE}"); push @strings, map encode('utf-8', $_), @strings; say for sort @strings;
Hm. That code tells me nothing useful and neither does the output:
C:\test>\perl22\bin\perl.exe junk33.pl c c ç ć č ç ć č
Except maybe that sort readily accept mixed scalars, which doesn't make any sense at all to me.
How can it compare and collate strings that exist in two entirely different encoding spaces?
And interleaving them is like interleaving Chinese and Cyrillic strings; make no sense at all.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Mixed Unicode and ANSI string comparisons?
by Anonymous Monk on Dec 14, 2015 at 22:57 UTC | |
|
Re^3: Mixed Unicode and ANSI string comparisons?
by exilepanda (Friar) on Dec 17, 2015 at 08:28 UTC |