Skip to content

net/url: encoding inconsistency between 1.4 and 1.5 for unicode domain names #12719

@VojtechVitek

Description

@VojtechVitek

Given this code (Go Playground):

package main

import (
    "fmt"
    "net/url"
)

func main() {
    u, _ := url.Parse("http://www.žluťoučký-kůň.cz")
    fmt.Println(u)
}

I get different results in go 1.4 and go 1.5:

$ go version
go version go1.4.2 darwin/amd64

$ go run main.go 
http://www.žluťoučký-kůň.cz
$ go version
go version go1.5.1 darwin/amd64

$ go run main.go 
http://www.%C5%BElu%C5%A5ou%C4%8Dk%C3%BD-k%C5%AF%C5%88.cz

Is this intended (but undocumented) behavior - or is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions