in reply to [SOLVED] same utf8 string is different in console and in browser (Sybase)
Compare:
#! /usr/bin/perl
use warnings;
use strict;
use feature qw{ say };
use utf8;
my @strings = ('школы',
"\xd1\x88\xd0\xba\xd0\xbe\xd0\xbb\xd1\x8b");
say for @strings;
binmode STDOUT, ':encoding(UTF-8)';
say for @strings;
The first two lines are the same:
школы школы
but once the output knows it expects UTF-8 (the third and fourth line), the output is different:
школы ΡΠΊΠΎΠ»Ρ
You probably didn't tell Sybase your strings are UTF-8.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: same utf8 string is different in console and in browser (Sybase)
by alexander_lunev (Pilgrim) on Aug 19, 2017 at 18:22 UTC | |
by shmem (Chancellor) on Aug 19, 2017 at 21:21 UTC | |
|
Re^2: same utf8 string is different in console and in browser (Sybase)
by alexander_lunev (Pilgrim) on Aug 19, 2017 at 18:05 UTC |