3 Replies Latest reply on Sep 5, 2009 9:01 AM by peterlyd

    UTF-8, æøå and Indesign Server CS4

    FlexDevNorway Level 1

      I have a problem with æøå-characters in my script. IDS4 do take (only) UTF-8.

       

      I use a SOAP-call (using almost the sample asp.net script in IDS4 SDK) from asp.net C# to indesign server. Everything is fine, but characters like æøåé and so on becomes garbeled in the document and filename.

       

      Have anyone any tips on what to do? I have tried escaping and uriencoding, but no luck...

       

      Sincerly

      Per Villy Johansen

        • 1. Re: UTF-8, æøå and Indesign Server CS4
          FlexDevNorway Level 1

          Okay, seems that the problem is that IDS4 is having a problem processing ScriptArgs with these special characters. Have tried IDS3 now, and that is no problem. Anyone know of why this is, is it a bug?

          • 2. Re: UTF-8, æøå and Indesign Server CS4
            peterlyd

            Hi.

            I too have this problem, trying to bring our InDesign Server cs3 application to CS4. (and as I am from Denmark I have run into these æøå problems). What worked in CS3 is now broken. The analyse shows that calling a IDS4 webservice front runscript with a parameter does not translate e.g the character 'æ' correct. In our open documents rutine we can bring in a standard windows path to the document, but if it includes characters outside the 7 bit acsii range it gets messy.

            I have dumped the webservice call xml and here it shows correct utf-8 representation of character 'æ'.

            <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body>runScriptParameters xmlns=""><scriptText xsi:nil="true" /><scriptLanguage>javascript</scriptLanguage><scriptFile>C:\Program Files\Adobe\Adobe InDesign CS4 Server\Scripts\Web2Publish\OpenDocument.jsx</scriptFile>

            <scriptArgs><name>fullPath</name><value>C:\kunder\w2p\testæ1234567890.indd</value></scriptArgs></runScriptParameters></RunScript></soap:Body></soap:E nvelope>

            The "æ" is in hex: C3 83. So this seem fine., but "app.scriptArgs.getValue('fullPath')" returns: C:\kunder\w2p\test&lt;6C72&gt;34567890.indd

             

            The ony way to make it work is to send: testæ1234567890.indd in the call traslatet in the xml as: testæ1234567890.indd (æ = hex: C3 83 C2 A6) which I belive is somehow double encoding, but it works.

             

            Regards

             

            Peter Henriksen

            Bording Data.

            • 3. Re: UTF-8, æøå and Indesign Server CS4
              peterlyd Level 1

              Hi.

               

              I have successfully circumvented the problem ´by encodeing the parameter stings with base64 before sending, and then decode in the ID script before using them.