dokuwiki-plugin-gitbacked icon indicating copy to clipboard operation
dokuwiki-plugin-gitbacked copied to clipboard

Possible problem with cyrillic support

Open zlobniyshurik opened this issue 3 years ago • 3 comments

PHP 8.0 Release 2022-07-31 "Igor"

It seems, that any cyrillic letters don`t saves to comments of git commits.

Comment in wiki with latin letters:

17/08/2022 05:40 [start](https://dokuwiki.domain.ru/doku.php?id=start) – [Infrastructure] Link to Infrastructure start page adyadyun

git log:

commit 6df35047584de92fca9b91976500fb009e6cfa6a
Author: Александр Дядюн <[email protected]>
Date:   Wed Aug 17 05:40:14 2022 +0000

    Wiki page "start" changed with summary [[Infrastructure] Link to Infrastructure start page] by

Comment in wiki with cyrillic letters:

17/08/2022 05:28 [start](https://dokuwiki.domain.ru/doku.php?id=start&rev=1660714104) – Первый набросок стартовой страницы, без линков adyadyun

git log:

commit cff39a99a818d781f858c69bacfab835231b14dc
Author: Александр Дядюн <[email protected]>
Date:   Wed Aug 17 05:28:24 2022 +0000

    Wiki page start changed with summary [   ,  ] by

zlobniyshurik avatar Aug 17 '22 06:08 zlobniyshurik

@zlobniyshurik many thanks for letting us know about this issue.

What is the operating system you are hosting DokuWiki on?

mhoffrog avatar Aug 19 '22 16:08 mhoffrog

Oracle Linux Server release 8.6

Just tested pure git for cyrillic support, no problems...

# git log
commit fae47c12615f5e3d4ac387bc486d269cae294074 (HEAD -> master)
Author: root <[email protected]>
Date:   Sat Aug 20 01:11:14 2022 +0000

    Тестовый коммит

zlobniyshurik avatar Aug 20 '22 01:08 zlobniyshurik

@zlobniyshurik this issue is root caused by the escapeshellarg($message) in Git.php function commit(...).

This is to be fixed. I'd prefer to persist the $message in a temporary binary file and make use of git commit --file=<tmpfile> rather than the -m "message" option.

Same is to be applied for function Git.add_tag(...).

mhoffrog avatar Aug 23 '22 21:08 mhoffrog