Okay where to start..

I'm reading a bunch of filenames from disk, utf-8 filenames
inserting them in MongoDB via mgo
inserted document fields are stored with the actual utf-8 characters
e.g. { "name": "Anstoss.Stö.TRP+GRB.zip"}
Now in a pagehandler I'm reading those files from MongoDB via mgo

type File struct {
Name string

In the template I have
{{ range .Files }}
<a href="/files/{{.Name}}">{{.Name}}</a>

The output however is

<a href="/files/a/Anstoss.St%c3%b6.TRP+GRB.zip">Anstoss.Stö.TRP+GRB.zip</a>

but there is only 1 document
     "_id" : "e90644b9-b348-4955-a661-b78001d053ec",
     "name" : "Anstoss.Stö.TRP+GRB.zip",
     "path" : "a/Anstoss.Stö.TRP+GRB.zip",
     "size" : NumberLong(27584),
     "sha512" :

Why is this happening?
How can I prevent this?

You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupgolang-nuts @
postedSep 7, '14 at 1:58p
activeSep 7, '14 at 2:19p

1 user in discussion

Darko Luketic: 3 posts



site design / logo © 2022 Grokbase