Submitted by : simon at: 2008-05-01T14:06:49-07:00 (9 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

A link like IE6JP日本語 is not always linked. It works on this page and in fact everywhere except here.

Possibly related, renderLink can't link a unicode string, which I expected to work.

two issues at least --simon, Thu, 01 May 2008 15:09:59 -0700 reply

  1. the failing link had a :: right after it, causing it to be matched as an interwiki link. I made the interwikilink regexp tighter.

  2. page.evaluatePreRenderedAsDtml(page,REQUEST,RESPONSE,**kw) in rst.py converts this text:

    <zwiki>[IE6JP\u65e5\u672c\u8a9e]</zwiki>
    

    to:

    <zwiki>[IE6JP\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e]</zwiki>
    

    It does this only on the problem page #1408, but not on another page like IE6JP日本語.

yes, dtml --simon, Thu, 01 May 2008 15:52:04 -0700 reply

It happened on #1408 because that page hasDynamicContent() and so evaluates itself as DTML, and the other doesn't.

ZWikiPage.py:cook() is encoding the text before giving it to DTML - see comment. Unfortunately, that seems to be needed - see how test_dtml_in_rst breaks without it. Not sure how to get out of this one!

fixed --simon, Thu, 01 May 2008 16:59:11 -0700 reply

Name: '#1411 unicode linking issue' => '#1411 ::/unicode/dtml linking issue' Status: open => closed

Encoding in cook and decoding again in evaluatePreRenderedAsDtml seems to have done the trick!

... --simon, Fri, 23 Oct 2009 07:43:20 -0700 reply

Name: '#1411 ::/unicode/dtml linking issue' => '#1411 non-ascii wiki links not working with :: and dtml'