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

native2ascii not working correctly on NT

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.1.6, 1.2.0
    • core-libs

      If you create a file on NT (using Notepad)
      containing the characters 'A' and 'B' on
      separate lines, save the file in Unicode, and then convert to ascii
      using:
             native2ascii -encoding Unicode input output

      The output contains the following bytes
      41 0D 0A 0D 0A 00 42 0D 0A

      It should contain
      41 0D 0A 42 0D 0A

      The original input file contains:
      FF FE 41 00 0D 00 0A 00 42 00

      Note, the problem is not confined to NT, but files
      like this are more likely to exist on NT. Also, it does not
      seem to work in the reverse direction either.

            ilittlesunw Ian Little (Inactive)
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: