[OpenStreetMap] #4127: non-ascii UTF-8 symbols in GPX traces names are converted to '_' on upload

OpenStreetMap trac at openstreetmap.org
Sat Dec 10 19:12:48 GMT 2011


#4127: non-ascii UTF-8 symbols in GPX traces names are converted to '_' on upload
---------------------------------------------+------------------------------
 Reporter:  one_half_3544                    |       Owner:  rails-dev@…                
     Type:  defect                           |      Status:  new                        
 Priority:  minor                            |   Milestone:                             
Component:  website                          |     Version:                             
 Keywords:  trace, gpx, utf-8, localization  |  
---------------------------------------------+------------------------------

Comment(by one_half_3544):

 Well, I hoped to invite the author of that line of code to the
 conversation, but since you are already here
 {{{
 3db4ac9a (Tom Hughes              2007-09-25 23:18:32 +0000 369)     name
 = file.original_filename.gsub(/[^a-zA-Z0-9.]/, '_')
 }}}
 =)

 In general modern filesystems (like ext3) should deal fine with utf-8
 filenames. Wikipedia, for example, accepts utf-8 filenames as is. And,
 afaik, mediawiki engine stores them directly on the filesystem. Of course
 they could have changed that or could have introduced their own sanity
 checks. I'll study that, but at the first glance it seems that regex could
 be changed to utf-8 equivalent of [[:print:]] without downgrading
 security.

-- 
Ticket URL: <https://trac.openstreetmap.org/ticket/4127#comment:4>
OpenStreetMap <http://www.openstreetmap.org/>
OpenStreetMap is a free editable map of the whole world



More information about the rails-dev mailing list