[Using Sakai] Short URLs for files with non ASCII characters

Rafael Morales Gamboa rmorales at suv.udg.mx
Sun Aug 18 16:56:40 PDT 2013


I searched the url_randomised_mappings_t, ran the results through od, and
found that

0000000   1   1  \t   H   a   q   X   O   C  \t   h   t   t   p   :   /
0000020   /   v   i   r   t   u   a   l   .   c   u   d   i   .   e   d
0000040   u   .   m   x   :   8   0   8   0   /   a   c   c   e   s   s
0000060   /   c   o   n   t   e   n   t   /   g   r   o   u   p   /   8
0000100   b   f   7   3   c   8   c   -   0   9   6   8   -   4   9   1
0000120   4   -   8   c   4   4   -   9   1   8   d   7   6   f   a   3
0000140   8   9   6   /   I   n   t   r   o   d   u   c   c   i 363   n
0000160       a       S   a   k   a   i       -       P   e   r   s   p
0000200   e   c   t   i   v   a       d   e   l       U   s   u   a   r
0000220   i   o   .   p   d   f  \n

So the URL is stored using #f3 (octal 363) for the 'ó' (accute o). In other
words, Sakai/MySQL is using the ISO 8859-1 encoding instead of UTF-8 to
store shortened the URL.

Regards,
Rafael


2013/8/18 Steve Swinsburg <steve.swinsburg at gmail.com>

> Go to the database and see what the full url is for this shortened URL.
> Does it match the actual resource URL?
>
> Cheers,
> Steve
>
> Sent from my iPad
>
> On 17/08/2013, at 7:23, Rafael Morales Gamboa <rmorales at suv.udg.mx> wrote:
>
> Actually, I was wrong. Tomcat is configured with URIEncoding="UTF-8" and
> the database seems to be OK (despite de fact that there is no
> character_set_server=utf8 in my.conf:
>
> mysql> SELECT default_character_set_name FROM information_schema.SCHEMATA S
>     -> WHERE schema_name = "sakai";
> +----------------------------+
> | default_character_set_name |
> +----------------------------+
> | utf8                       |
> +----------------------------+
> 1 row in set (0.00 sec)
>
> The question is whether I should add that configuration line to my.conf,
> anayway.
>
> Regards,
> Rafael
>
> El 15/08/2013 06:50 p.m., Mike DeSimone escribió:
>
>  Hi Rafael,
>
>  Sometimes things like this are due to database settings and tomcat
> connector settings.  Can you confirm the 8080 connector
> has URIEncoding="UTF-8"?  Also, if this is MySQL, then ensure this is in
> the my.cnf: character_set_server=utf8 and the database was created with
> utf8 encoding.
>
>  more info can be found here:
> https://confluence.sakaiproject.org/display/DOC/Sakai+CLE+2.9+Release+Notes#SakaiCLE29releasenotes-Databasesupport
> and:
> https://confluence.sakaiproject.org/pages/viewpage.action?pageId=82249313(section 3 for tomcat setup)
>
>  I also have found that files cannot easily be renamed in the Sakai UI.
>  Not sure if there's any other solution than your suggestion.
>
>
> Thanks,
>
> *********************************************
> Mike DeSimone
> Director of Enterprise Operations
> Asahi Net International, Inc. (*ANI*)
> O: +1 (602) 490-0473
>  W: anisakai.com
>
>  [image: Inline image 1]
>   **********************************************
>
>
> On Wed, Aug 14, 2013 at 4:25 PM, Rafael Morales Gamboa <
> rmorales at suv.udg.mx> wrote:
>
>>  Hello,
>>
>> On Sakai 2.9.1 I uploaded a file to Resources that was called
>> 'Introducción a Sakai - Perspectiva del Usuario.pdf' in my computer, and I
>> renamed it to 'Introducción a Sakai.pdf' in Resources and made it public.
>> Under properties I can see now its URL:
>>
>>
>> http://virtual.cudi.edu.mx:8080/access/content/group/8bf73c8c-0968-4914-8c44-918d76fa3896/Introducci%C3%B3n%20a%20Sakai%20-%20Perspectiva%20del%20Usuario.pdf
>>
>> So, the URL is composed from the original name of the file in my
>> computer, and I cannot see a way to change it unless renaming the file in
>> my computer before uploading it to Resources.
>>
>> Now, if I choose the Short URL option I get the URL
>> http://virtual.cudi.edu.mx:8080/x/HaqXOC, and at least three distinct
>> behaviours in browser (latest public releases of them):
>>
>>    1. In Firefox, I get error 404.
>>    2. In Chrome, it is translated to
>>    http://virtual.cudi.edu.mx:8080/access/content/group/8bf73c8c-0968-4914-8c44-918d76fa3896/Introducci%F3n%20a%20Sakai%20-%20Perspectiva%20del%20Usuario.pdf('ó' is encoded as %F3 instead of %C%B3) and I get error 404.
>>    3. In Internet Explorer it works! ('ó' is just 'ó').
>>
>> The questions are (1) why do I get all this different behaviours? and (2)
>> how can I get it to work on all these browsers?
>>
>> Regards,
>> Rafael
>>
>>
>> _______________________________________________
>> sakai-user mailing list
>> sakai-user at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-user
>>
>> TO UNSUBSCRIBE: send email to
>> sakai-user-unsubscribe at collab.sakaiproject.org with a subject of
>> "unsubscribe"
>>
>
>
>
> _______________________________________________
> sakai-user mailing list
> sakai-user at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-user
>
> TO UNSUBSCRIBE: send email to
> sakai-user-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-user/attachments/20130818/263bcdfa/attachment.html 


More information about the sakai-user mailing list