- or download this
psql=# create database novels owner ron encoding 'UTF8';
- or download this
"author","category","title","rating","comment","isbn","publisher","p
+ublication_date","review_date"
"Colm Tóibín","Novel","The South","***","-","-","Picador","-","2012-
+06-12"
- or download this
use feature 'unicode_strings';
use open qw/:std :utf8/;
...
{
$result = $rs -> create({name => $_, upper_name => uc $_});
}
- or download this
novels=# select * from authors where name like 'Colm%';
id | name | upper_name
-----+-------------+-------------
100 | Colm Tóibín | COLM TóIBíN
(1 row)
- or download this
use feature qw/say unicode_strings/;
use open qw/:std :utf8/;
...
say "name: $name.";
say "decode: $decode.";
say "json: $json.";
- or download this
ron@zigzag:~/perl.modules/Local-Novels$ perl scripts/test.utf8.pl
name: Colm TóibÃn.
decode: Colm Tóibín.
json: {"name":"Colm Tóibín"}.
- or download this
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
+>
- or download this
use feature 'unicode_strings';
use Encode 'decode';
...
$output = {results => $result};
return JSON::XS -> new -> utf8(0) -> encode($output);
- or download this
return JSON::XS -> new -> utf8(1) -> encode($output);