Hi,

I'm trying to parse a utf-8 url, but the url.parse function doesn't
seem to like spaces.

var url = require("url");
var file_url = "http://myhost.nl:9090/some/path/myweirdfile æfqúsß.mp3";
console.log("parsed:" , url.parse(file_url));

This gives the following output:

parse: { protocol: 'http:',
  slashes: true,
  host: 'myhost.nl:9090',
  port: '9090',
  hostname: 'myhost.nl',
  href: 'http://myhost.nl:9090/some/path/myweirdfile',
  pathname: '/some/path/myweirdfile',
  path: '/some/path/myweirdfile'
}

Where exactly do I need to tackle this and how?

Thijs

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to