[Act] Garbled Non-ASCII characters in the Wiki

Harald Jörg haj at posteo.de
Fri Dec 28 13:53:04 CET 2018


Hello Laurent,

You write:

> I've applied this patch to Act.
> This does not change anything on the tests I made.
> Feel free to cross-check and let me know.

Thanks for doing this experiment!

The patch doesn't seem to work at https://act.yapc.eu/ - sorry.

I developed and tested the patch in a local installation of a cloned Act
repository, but grabbed the current version of Perl, Wiki::Toolkit, and
DBD::Pg (and probably all other dependencies, too).  And, as I failed to
install mod_perl 1, I'm running the psgi branch, cherry-picking changes
from master.  I have not yet thoroughly checked Ilya's pull request, but
it also goes for the pg_enable_utf8=0 workaround.

> Note that this patch applies to version 0.31, while Act
> is using version 0.29 of Wiki::Toolkit::Store::Database

That version is from 2010 (Wiki-Toolkit 0.79), but after comparing the
sources I doubt that the problem is the version of Wiki::Toolkit.  It is
more likely that changes in DBD::Pg are responsible for different
behaviour.  There were some releases of the database driver in 2017/2018
with changes of UTF-8 handling.  I have DBD::Pg version 3.7.4 installed,
the PostgreSQL version is 9.6.

While testing the stuff I've found some other issues with Wiki::Toolkit,
I'm about to provide test cases for them.  I am also not too happy with
the documentation of the pg_enable_utf8 in DBD::Pg, which doesn't say
anything about whether and how it effects _writing_ to the database.

I plan to dig a bit more through this, but with the holidays and the
family all around hacking hours are not so frequent :)

> I see if I can safely update the version to of Wiki::Toolkit
>
> Regards
> Laurent
>
>
> Le 20/12/2018 à 19:25, Stefan Hornburg (Racke) a écrit :
>> On 12/20/18 5:30 PM, Harald Jörg wrote:
>>> Roland Schmitz writes:
>>>
>>>> Hi haj,
>>>>
>>>> your right, we (nr.pm) faced this problem last year too. I guess it is
>>>> a encoding problem in the database, because on the previe page
>>>> everything is fine as far as I remember. Umlauts get puzzeled after
>>>> saving the artikle to the db.
>>>
>>> I have now tracked this down to a misunderstanding between Wiki::Toolkit
>>> and DBD::Pg - there's nothing the Act software can do about it.  I have
>>> submitted a Pull Request to Wiki::Toolkit:
>>> https://github.com/OpenGuides/Wiki-Toolkit/pull/13
>>>
>> 
>> Yeah, but the admins could apply this patch to the local copy of Wiki::Toolkit.
>> 
>> Also this concatenation with the dots can be discarded as it became a static string.
>> 
>> Regards
>>          Racke
>> 

-- 
Cheers,
haj


More information about the Act mailing list