[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Artanis] database with Japanese text not displaying properly

From: Nala Ginrut
Subject: Re: [Artanis] database with Japanese text not displaying properly
Date: Sat, 23 Jun 2018 02:56:35 +0800
User-agent: mu4e 1.1.0; emacs 25.1.1

Hi Julio!

Julio Claudio Matus Ramirez writes:

> Hello Nala Ginrut,
> <% (DB-query conn "set names utf8") %>
> (adding this before calling the database query in the viewer)

This should be configurable in Artanis, I will consider how to do it
properly. The idea is that users shouldn't consider these stuff by themselves.
Thanks for point it out!

> It's the only way I could find to change the encoding for the client
> output. If you have any other solution/suggestion I'm very interested.
> It would be great if we could add random connection initilization raw
> strings/options as with other frameworks. Being able to call random sql
> code would be nice too (I'm guessing you didn't intend DB-query to be
> used in this way).

I've added a hook which should be triggered each time when DB is
initializing, it's named run-when-DB-init in (artanis utils). And you
should add your hook in ENTRY file:

(use-modules (artanis utils) (artanis artanis))
(lambda (conn)
(DB-query conn "set names utf8")))

(init-server) ; make sure the hook is registered before (init-server)

This will effect all pre-connected connections in conn-pool

The commit is here:

Could you try and feedback?

GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]