[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: Julio Claudio Matus Ramirez
Subject: Re: [Artanis] database with Japanese text not displaying properly
Date: Thu, 21 Jun 2018 23:17:11 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello Nala Ginrut,

Thanks for the suggestion. But setlocale didn't fix it. I was able to
input/output Japanese just fine on guile, the only problem was with the
database (client) connection...
After many hours, I got to this solution:

<% (DB-query conn "set names utf8") %>

(adding this before calling the database query in the viewer)

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).

P.S. Still loving this project.

Nala Ginrut <address@hidden> writes:

> Hi Julio!
> If there's any problem when you show CJK on the web, please try to set
> the proper locale, for example, when I want to support Chinese, I add
> this line to the top of ENTRY file:
> ------------------------------
> (setlocal LC_ALL "zh_CN.utf8")
> ------------------------------
> I'll manage to provide better i18n, but for now please use this work
> around.
> Thanks for report!
> Best regards.
> Julio Claudio Matus Ramirez writes:
>> Hello.
>> I've been trying to use artanis for the past few days, but it looks as I
>> hit a wall...
>> I'm trying to renew a super old private system I have running on
>> php, using a mysql (Innodb) database.
>> I have some data in Japanese too (utf-8), which is apparently only shown
>> with question marks. Any known issues? Is this not supported or
>> something? Maybe I'm forgetting a keyword somewhere...
>> This is my debug code, but I have about the same on the controller/view
>> with the same results:
>>     (define conn (connect-db 'mysql init-str))
>>     (define some-desc (map-table-from-DB conn))
>>     (define print-row
>>       (lambda (row)
>>       (tpl->html
>>        (list 'tr
>>              (map
>>               (lambda (item) (list 'td (format "~a" (cdr item)))) row) ))))
>>      (tpl->html (map print-row (some-desc 'get 'description #:columns '(*) 
>> )))
>> Actually the moment I do (some-desc 'get 'description #:columns '(*) )
>> the output is already with a bunch of question marks where the Japanese
>> is supposed to go.
>> I copied manually the data from my other database to the new one I
>> created with art.
>> The mysql table shows: CHARSET=utf8mb4
>> And I can see the data with no problem in my terminal.
>> Any kind of hint/comment would be appreciated.
>> P.S. Love this project.
> --
> GNU Powered it
> GPL Protected it
> GOD Blessed it
> HFG - NalaGinrut
> Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

GPG key:

reply via email to

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