Markus**: urlEncode...

Hallo Forum!

Warum codiert urlEncode() "Hamburg - ööö" zu "Hamburg%20-%20%C3%B6%C3%B6%C3%B6" und nicht zu "Hamburg%20-%20%F6%F6%F6", so wie ich es gern hätte!
Wo hab ich das charset Problem?

Gruß, Markus

  1. Hi,

    Warum codiert urlEncode() "Hamburg - ööö" zu "Hamburg%20-%20%C3%B6%C3%B6%C3%B6" und nicht zu "Hamburg%20-%20%F6%F6%F6", so wie ich es gern hätte!

    Was soll urlEncode denn fuer eine JavaScriptfunktion sein? Eine native mit diesem Namen ist mir nicht bekannt.

    Meinst du vielleicht encodeURI oder encodeURIComponent?
    Fuer beide sagt Mozillas Developer Center:
    "Encodes a Uniform Resource Identifier (URI) [component] by replacing each instance of certain characters by one, two, or three escape sequences representing the UTF-8 encoding of the character."

    MfG ChrisB

    --
    „This is the author's opinion, not necessarily that of Starbucks.“
    1. Meinst du vielleicht encodeURI oder encodeURIComponent?
      Fuer beide sagt Mozillas Developer Center:
      "Encodes a Uniform Resource Identifier (URI) [component] by replacing each instance of certain characters by one, two, or three escape sequences representing the UTF-8 encoding of the character."

      MfG ChrisB

      Äh, ja natürlich meinte ich decodeURI, ist schon etwas spät, sorry!
      Danke für den Hinweis. Jetzt klappt's!

      Gute Nacht!