You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
Reporter: memb_openstreetmap[at]mikini.dk [Submitted to the original trac issue database at 12.54pm, Saturday, 29th April 2006]
When a tag contains special characters, like a danish (ASCII 0xe5/#229, HTML å, UTF-16 0x005e, UTF-8 0xc3 0xa5), the two raw UTF-8 values (0xc3 and 0xa5 in my example) is sent to the browser in both text and link which interprets it as two seperate (utf-16?) characters. Thus both text and link is broken.
Author: erik[at]tiq.com [Added to the original trac issue at 3.32pm, Sunday, 21st May 2006]
They get the data in different manners. *render_gpx_list.rhtml'' uses *dao.gpx_files''' and ''upload.gpx.rhtml'' uses 'dao.gpx_tags
== Solution 1 ==
perhaps changing this in render_gpx_list:
tags = row['tags'].split() unless row['tags'].nil?
to this:
tags = dao.gpx_tags(row['id'])
might work.
but this will create lots of unnecesary SQL calls.
== Solution 2 ==
The problem is in dao.rb, where the SQL is different.
This returns UTF-8
select gpx_id,group_concat(tag SEPARATOR ' ') as tags from gpx_file_tags group by gpx_id)
tags = row['tags'].split() unless row['tags'].nil?
vs.
This that returns latin-1
select tag from gpx_file_tags where gpx_id = #{q(gpx_id.to_s)} order by sequence_id asc
res.each { |tag| tags << tag[0] }
return tags
Reporter: memb_openstreetmap[at]mikini.dk
[Submitted to the original trac issue database at 12.54pm, Saturday, 29th April 2006]
When a tag contains special characters, like a danish (ASCII 0xe5/#229, HTML å, UTF-16 0x005e, UTF-8 0xc3 0xa5), the two raw UTF-8 values (0xc3 and 0xa5 in my example) is sent to the browser in both text and link which interprets it as two seperate (utf-16?) characters. Thus both text and link is broken.
See my listing at http://www.openstreetmap.org/traces/user/Mikkel%20Kirkgaard%20Nielsen for an example (trace 3330).
Just saw that on the detailed page when clicking more (at http://www.openstreetmap.org/traces/user/miki/3330) both text and link is ok.
Tested using Firefox 1.5.0.2 and IE 5.50 on win98, but I guess it's browser independent.
Mikkel,
The text was updated successfully, but these errors were encountered: