Hello
I'm french and there are lot of spécial caractères in my Dancer App,
é à ç etc...
I use this config.yml
charset: "UTF-8"
template: "template_toolkit"
engines:
template_toolkit:
encoding: 'utf8'
start_tag: '[%'
end_tag: '%]'
....
plugins:
Database:
connections:
db:
driver: 'mysql'
database: 'asav'
host: 'localhost'
port: 3306
username: 'username'
password: 'password'
connection_check_threshold: 10
dbi_params:
RaiseError: 1
AutoCommit: 1
mysql_enable_utf8 : 1
charset: utf8
log_queries: 1
all is completely transparency - I use this locale config in my
centos 6.5
locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
mysql> show create database db;
+----------+---------------------------------------------------------------+
| Database | Create
Database |
+----------+---------------------------------------------------------------+
| db | CREATE DATABASE `db` /*!40100 DEFAULT CHARACTER SET utf8
*/ |
+----------+---------------------------------------------------------------+
1 row in set (0.00 sec)
I use debug cmd to show data for debuging in console - all works
well
I use redis or YAML , please do not use session JSON, there are a
bug with accents when you get data with accents stored in session.
#session: 'YAML'
session: 'Redis'
#session: "JSON"
I start with
use utf8; on each lib.pm
bye
Hugues.
Le 27/06/2014 20:24, WK a écrit :
_______________________________________________
dancer-users mailing list
dancer-users@dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
--
Salutations