-
Bug
-
Resolution: Fixed
-
P3
-
1.1.6, 1.2.0
-
beta2
-
x86
-
windows_nt
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.
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.
- duplicates
-
JDK-4218514 native2ascii is broken in regards to line-ends
-
- Closed
-
- relates to
-
JDK-4472670 native2ascii incorrectly processing the '-encoding' argument.
-
- Resolved
-
-
JDK-4435607 native2ascii - Incorrect conversion of Unicode characters with #D or #A
-
- Resolved
-