I have got a Node.js application which uses umlauts in some of its urls. When I run node.js locally, everything works fine.
Now I want to deploy this application to Heroku. Running Heroku's foreman locally works fine as well, but once I deploy and try to access any of the umlaut urls, I get an "500 Internal server error".
Does Heroku support umlauts in urls when running Node.js? If so, any idea what I might be doing wrong?
To use umlauts (or other special characters) you need to "url-encode" or "percent encode" the characters so they can be used properly in URLs. In your case the umlauts could be substituted with the code %d6
(see this chart), but you may be more interested in the javascript function encodeURIComponent
, which will let you encode things programatically. See also this answer.