Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-19591

Javascript UTF16LE issue

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Confirmed
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.4.1
    • Fix Version/s: None
    • Component/s: Proxy (P), Server (S)
    • Labels:
    • Environment:
      Ubuntu 20.04

      Description

      Steps to reproduce:

      1.  Script Item with this function:

       

      function strUTF16LE(input){
      output = "";
      for (var i = 0; i < input.length; i++)
       output += String.fromCharCode(input.charCodeAt(i) & 0xFF, (input.charCodeAt(i) >>> 8) & 0xFF);
      return output;
      }
      return strUTF16LE("abcdefg-123456789");
      

       

       

      Result:
      Only the first character (a) is returned
      Expected:
      The whole string (abcdefg-123456789) should be returned, as tested in Mozilla Firefox

        Attachments

          Activity

            People

            Assignee:
            zabbix.dev Zabbix Development Team
            Reporter:
            seyfidin Seyfidin Hamraoui
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: