5 Replies Latest reply on May 10, 2017 5:32 PM by JR_Boulay

    Keep text "\"

    sargums46564804 Level 1

      I want to keep the "\" in the static text below but the output shows it missing.  How can I maintain the "\" in the static text?

       

      {

                                          type: "view",

                                          align_children: "align_top",

                                          alignment: "align_top",

                                          elements:

                                          [

                                              {

                                                  type: "static_text",

                                                  name: "      *Note: Retrieve labeled files from c:\Automatically Labeled Documents folder.",

                                                 

                                              },

       

       

                                          ]

                                        },

        • 1. Re: Keep text "\"
          Bernd Alheit Adobe Community Professional & MVP

          Use 2 backslashes \\

          • 2. Re: Keep text "\"
            try67 MVP & Adobe Community Professional

            Add a "\" before it.

            • 3. Re: Keep text "\"
              sargums46564804 Level 1

              Yay! Thx.

              • 4. Re: Keep text "\"
                JR_Boulay Adobe Community Professional

                Hi.

                 

                Using 2 backslashes is the old school practice and it's not reliable.

                You should use the Unicode ID of the backslash instead, as for the ":", for the "*" and for any special character.

                 

                The last line of the script should look like this:

                name: "\u002ANote\u003A Retrieve labeled files from c\u003A\u002FAutomatically Labeled Documents folder.",

                 

                You can download this free tool to convert any character to its Unicode ID: http://abracadabrapdf.net/download/Texte2Unicode.pdf

                Enter your text in the first text field, clic anywhere else and voilà!

                 

                 

                 

                Capture.png

                • 5. Re: Keep text "\"
                  JR_Boulay Adobe Community Professional

                  In French (as in Spanish, Italian, German, etc.), we are used to handling accented and special characters in JavaScript strings.

                  This JavaScript:

                  app.alert("\u0044\u00E8\u0073\u0020\u004E\u006F\u00EB\u006C\u0020\u006F\u00F9\u0020\u0075\u006E\u0020\u007A\u00E9\u0070\u0068\u0079\u0072\u0020\u0068\u0061\u00EF\u0020\u006D\u0065\u0020\u0076\u00EA\u0074\u0020\u0064\u0065\u0020\u0067\u006C\u0061\u00E7\u006F\u006E\u0073\u0020\u0077\u00FC\u0072\u006D\u0069\u0065\u006E\u0073\u0020\u006A\u0065\u0020\u0064\u00EE\u006E\u0065\u0020\u0064\u0027\u0065\u0078\u0071\u0075\u0069\u0073\u0020\u0072\u00F4\u0074\u0069\u0073\u0020\u0064\u0065\u0020\u0062\u0153\u0075\u0066\u0020\u0061\u0075\u0020\u006B\u0069\u0072\u0020\u00E0\u0020\u006C\u0027\u0061\u00FF\u0020\u0064\u0027\u00E2\u0067\u0065\u0020\u006D\u00FB\u0072\u0020\u0026\u0020\u0063\u00E6\u0074\u0065\u0072\u0061\u0020\u0021");
                  

                   

                   

                  Displays this alert:

                  Capture 1.png

                   

                  (Do not look for any meaning in this sentence it is a pangram.)

                   

                   

                  .