Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8294885

java.exe mangles command-line arguments with Combining Diacritical Marks

XMLWordPrintable

    • x86_64
    • windows

      ADDITIONAL SYSTEM INFORMATION :
      Windows

      A DESCRIPTION OF THE PROBLEM :
      We observe in our test case that U+0301 Combining Acute Accent is somehow translated to U+00B4 Grave Accent at some point before Java Main() but after C main().

      We also tested with python.exe for good measure and cannot reproduce the issue there.


      See PowerShell commands below to reproduce the problem:
      1. Pass é [101, 769] as command-line argument
      2. Find e´ [101, 180] in the argument String value



      $NFD = "$([char]101)$([char]769)"
      PS C:\tmp> echo $NFD

      PS C:\tmp> groovy -e "println args; println args*.codePoints()*.toList()" $NFD
      [e´]
      [[101, 180]]


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      $NFD = "$([char]101)$([char]769)"
      PS C:\tmp> echo $NFD

      PS C:\tmp> groovy -e "println args; println args*.codePoints()*.toList()" $NFD
      [e´]
      [[101, 180]]

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      [é]
      [[101, 769]]
      ACTUAL -
      [e´]
      [[101, 180]]

      FREQUENCY : always


            adev Anupam Dev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: