You are viewing ru_catalyst

Catalyst Web Framework - MojoMojo, Text::Textile и Cyrillic
The elegant MVC framework

Alex Povolotsky posting in  The elegant MVC framework
User: ru_catalyst (posted by tarkhil)
Date: 2010-01-06 14:54
Subject: MojoMojo, Text::Textile и Cyrillic
Security: Public
Господа товарищи!

Пытался поставить MojoMojo, немного доработал напильником (и кувалдой) и уперся в проблемы

1. Text::Textile странно работает с русским.

В частности

perl -MText::Textile -e 'my $t = Text::Textile->new(charset=>"utf-8");print $t->textile("h1.И где он уродует русский?\n\n* Раз\n* Два\n\n_просто_\n"),"\n";'


и

perl -MText::Textile -e 'my $t = Text::Textile->new(charset=>"utf-8");$t->charset("utf-8");print $t->textile("h1.И где он уродует русский?\n\n* Раз\n* Два\n\n_просто_\n"),"\n";'


выдают разный результат.

2. Тривиальный патч Formatter::Textile не помог, при редактировании по-прежнему в поле textarea все равно крокозябры

3. Главная проблема, вероятно, вытекающая из вышеуказанных - MojoMojo не понимает викислов по-русски, кроме слов только из маленьких букв. В английском - понимает.

Может быть, кто-то уже продвинулся на пути понимания того, как с этим бороться?
Post A Comment | 4 Comments | Share | Link






dandv
User: dandv
Date: 2010-01-14 01:01 (UTC)
Subject: English please?
Hi, I'm one of the MojoMojo developers. I might be able to help you if you wrote this post in English.
Reply | Thread | Link



Alex Povolotsky
User: tarkhil
Date: 2010-01-14 05:47 (UTC)
Subject: Re: English please?
Not a problem. I've made some progress since this post.

The bug is simple to reproduce (i don't know if it is Cyrillic-specific, but I don't beleive in it)

1. Make some wikiword in UTF-8 starting with capital letter, say [[Проблема]] (translation: "Problem") on main page
2. See link to missing page
3. Edit missing page
4. Return to main page and regenerate it
5. See link to missing page
6. Click it, see the page you've edited

And the other, much worse

1. Make some wikiword in UTF-8, say [[первый]] (first)
2. Edit it, regenerate page, see good link
3. Make some wikiword in UTF-8 on that page, say [[второй]] (second)
4. Try to edit it. See ugly URL (something like егор instead of первый)
Reply | Parent | Thread | Link



dandv
User: dandv
Date: 2010-01-14 07:19 (UTC)
Subject: Bugs filed
Thanks for the report. I was able to reproduce the bugs with non-Russian non-ASCII characters and I've filed the two bugs in GitHub as issues 62 and 63. A temporary workaround is to have ASCII-only characters for the link, and any non-ASCII for the link text, e.g. [[beta|βeta]].
Reply | Parent | Thread | Link



Alex Povolotsky
User: tarkhil
Date: 2010-12-04 14:29 (UTC)
Subject: Re: Bugs filed
still nothing?
Reply | Parent | Thread | Link



browse
my journal
links
June 2011