bugMapOSMatic - Bugs: bug #28603, Non-latin characters are removed...


bug #28603: Non-latin characters are removed from generated file names

Submitter:  David Mentré <dmentre>
Submitted:  Thu 14 Jan 2010 08:17:29 AM UTC
Category:  i18n Severity:  3 - Normal
Priority:  * 1 - Later Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Thu 02 Dec 2010 10:25:54 PM UTC, comment #1: 

I don't really see Punycode as being a viable solution here. It does generate ASCII, but it doesn't add anything in terms of readable information to the filename:

>>> u'007864_2010-01-14_07-23_دمشق.png'.encode('punycode')


I would simply not strip non-ASCII characters. The filesystem supports it anyway. I'll give it a try on my local instance and see how it goes in terms of browser interaction, etc.

Maxime Petazzoni <mpetazzoni>
Group administrator
Thu 14 Jan 2010 08:17:29 AM UTC, original submission:  

From Bassem Jarkas:

If we use non-latin characters for naming the city, the name will be missing in the result files, and only the id and date will appears!

For example:
1- City: دمشق
   URL: http://www.maposmatic.org/jobs/7864
   File name: 007864_2010-01-14_07-23_.png
   The correct name should be: 007864_2010-01-14_07-23_دمشق.png

2- City: Микрорайоны
   URL: http://www.maposmatic.org/jobs/7863
   File name: 007863_2010-01-14_06-48_.png
   The correct name should be: 007863_2010-01-14_06-48_Микрорайоны.png

Things to take account when designing a solution: security issues, at both browser level (the name is used in the provided URL) and file system level (impact of non-latin encoding?).

Relevant dev@ discussion (with ideas):

David Mentré <dmentre>
Group administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mpetazzoni (Updated the item)
  • -email is unavailable- added by dmentre (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-30 mpetazzoni Severity4 - Important 3 - Normal
        Priority5 - Normal 1 - Later
    2010-05-11 mpetazzoni Categoryocitysmap i18n

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code