5 Replies Latest reply on Feb 11, 2016 1:46 AM by KyedDesign

    Encode URLs to ISO-8859..?

    KyedDesign

      Hi..


      I am trying to open a Google Maps URL from 4 filled variables via a form in Acrobat.

      I am using this Javascript code:

       

      var Adresse = getField("Adresse").value;

      var Nr = getField("Nr").value;

      var Postnr = getField("Postnr").value;

      var By = getField("By").value;

       

      var myURL = "http://www.google.dk/maps/place/"+Adresse+"+"+Nr+"+"+Postnr+"+"+By;

      app.launchURL(myURL, true);

       

      But when having ”æ”, ”ø” and ”å” in the variables, the output URL is not correct. This is my output:

      https://www.google.dk/maps/place/H%E6vlingeb%E5nken+17+4681+Herf%F8lge

       

      when typing these variables:

      Skærmbillede 2016-02-11 kl. 09.01.08.png

       

      So I need somehow to encode the URL to ISO-8859...or other encoding? so the characters "æ", "ø" and "å" are used correctly...

      Is that possible?