[aida] International Urls (was URL resolution patch)

Janko Mivšek janko.mivsek at eranova.si
Mon Jan 14 23:03:48 CET 2008


Masashi UMEZAWA wrote:

>> According to http://www.w3.org/International/O-URL-code.html:
>>
>> For worldwide interoperability, URIs have to be encoded uniformly. To
>> map the wide range of characters used worldwide into the 60 or so
>> allowed characters in a URI, a two-step process is used:
>>
>>     * Convert the character string into a sequence of bytes using the
>>       UTF-8 encoding
>>     * Convert each byte that is not an ASCII letter or digit to %HH,
>>       where HH is the hexadecimal value of the byte
> 
> Yes. This type of encoding is automatically done via web browser (IE
> and Firefox at least).
> 
> In my investigation:
> 1. In SwazooURI>>fromString: receives URI encoded string (like
> '/%E3%83%87%E3%83%A2.html').
> 2. The string is converted to Smalltalk byte string via
> HTTPString>>decodedHTTPFrom:.
> 3. But the string is only byte string, so it should be converted to
> m17n string by AIDASite level (maybe seeing codePage).

So Url resolution already works correctly in direction international 
url>domain object. But what about reverse direction, object>url?

As you know the Url resolution in Aida is two way, one from url to 
domain object, another from object to url. Second one is needed for 
auto-url generation on web pages with just pointing to domain object 
(#addLinkTo: anObject). And if domain object implements method 
#preferedUrl, you can suggest Url here. Obviously you can suggest 
international one too, but I'm not yet sure if this works. So Masashi 
please try this too.

Janko



-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list