OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xri message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [xri] XRI Escaping Tool



If you go to http://www.wachob.com/xriescape, there are links for the source code there (the CGI and the actual python code that does the escaping).
 
This isn't the prettiest Python in the world, but it should be readable enough.
 
    -Gabe


From: Sakimura, Nat [mailto:n-sakimura@nri.co.jp]
Sent: Sunday, February 20, 2005 11:35 PM
To: Wachob, Gabe; xri@lists.oasis-open.org
Subject: RE: [xri] XRI Escaping Tool

Hmmm. When I input Japanese (UTF-8 encoded), I seem to get a garbled result like:
 
INPUT: xri://崎村/夏彦
 
Output:
 
Original XRI: xri://=崎村/夏彦
XRI in IRI form: xri://=崎村/夏彦
XRI in URI form: xri://=%C3%A5%C2%B4%C2%8E%C3%A6%C2%9D%C2%91/%C3%A5%C2%A4%C2%8F%C3%A5%C2%BD%C2%A6
Return to the input form
Return to the input form
In this cgi, are you doing the round-trip to display the result?
 
Also, if you do not mind, opening up the source that you have to us will help people understand what exactly this translation is, IMHO. For many people, it is easier to read the code than English.
 
Nat

From: Wachob, Gabe [mailto:gwachob@visa.com]
Sent: Saturday, February 19, 2005 9:15 AM
To: xri@lists.oasis-open.org
Subject: [xri] XRI Escaping Tool

For my own understanding, and as a service to the XRI community, I have written a tool to implement what I understand to be the XRI to URI transformation rules. If you input an XRI with unicode (or just ascii) characters, it will display the IRI-normal and URI-normal forms. This obviously requires a utf-capable OS & browser, which is most of them these days. Tested on firefox 1.0 and IE6.
 
http://www.wachob.com/xriescape/
 
Please do try it. I've implemented this using the python unicode facilities and the escaping rules as I interpret them. I would like everyone to try this out themselves and please report back a) if the results are what you expect and b) if you see any hiccups.
 
I think one of the most complicated facets of XRI syntax is the escaping rules, but they are critical for interoperability, so please do hammer away.
 
    -Gabe
 
P.S. I will, of course, publish source code once I get a feeling that its producing results that seem to be agreeable with everyone.

__________________________________________________
gwachob@visa.com
Chief Systems Architect
Technology Strategies and Standards
Visa International
Phone: +1.650.432.3696   Fax: +1.650.554.6817
 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]