Uploaded image for project: 'Lucee Development'
  1. LDEV-1098

Lucee fails to cast the value returned from String.charAt(index) as integer

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1.1.34
    • Labels:
      None

      Description

      This code will output 116 on Adobe ColdFusion (which is the ASCII code for the letter "t".

      string= 'test';
      writeDump(JavaCast("int", string.charAt(0)))
      

      Using javacast on an char to cast it to an int apparently does the same as the asc() function. This code errors in Lucee 4.5 and Lucee 5.

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              bdw429s Brad Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: