0 Replies Latest reply on Nov 29, 2016 10:59 AM by Sergey Kritskiy

    Read text file with emojis

    Sergey Kritskiy Level 1

      Hi everyone,

      I need to load a file with emojis to Photoshop (don't ask...) and I'm having a problem choosing a right encoding.

      Is there even an encoding for this?


      var testLine = "test    string with emojis   ",
          fileIn = new File(Folder.desktop + "/temp/11.txt"); //file with the same string
      fileIn.encoding = "UTF-8"; //default I use one
      var lines = [];
      while (!fileIn.eof) {
      alert(testLine + "\n" + lines);


      And here's the result: the test string works, but the one I got from the file doesn't

      Monosnap 2016-11-29 19-55-44.png