in reply to [SOLVED] same utf8 string is different in console and in browser (Sybase)

Try this test script with browser and command line

#!/usr/bin/perl use strict; use warnings; use CGI ':standard'; my @lines = qx(locale); # html print header(),start_html('Locale Test'); print pre(@lines); print end_html();
poj
  • Comment on Re: same utf8 string is different in console and in browser (Sybase)
  • Download Code

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:28 UTC

    In browser it's:

    LANG= LC_CTYPE="C" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL=

    In console:

    LANG=ru_RU.UTF-8 LC_CTYPE="ru_RU.UTF-8" LC_COLLATE="ru_RU.UTF-8" LC_TIME="ru_RU.UTF-8" LC_NUMERIC="ru_RU.UTF-8" LC_MONETARY="ru_RU.UTF-8" LC_MESSAGES="ru_RU.UTF-8" LC_ALL=

    Problem is solved here 1197669, although i don't understand why strings are different in console and CGI.