-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.2.0
-
x86
-
windows_nt
Name: nl37777 Date: 09/29/98
=20
This program:
import java.awt.*;
import java.io.*;
public class fw extends Object
{
public static void main (String[] args)
{
System.out.println (System.getProperties());
fw f =3D new fw ();
}
fw ()
{
String filename =3D "utf8file.txt";
try
{
FileOutputStream os =3D new FileOutputStream (filename);
OutputStreamWriter fww =3D new OutputStreamWriter (os, "Cp1046"=
);
char text;
for (text =3D '\u0000'; text < '\u0100'; text++)
{
fww.write (text);
}
fww.close ();
}
catch (IOException exc)
{
String errorString =3D "IOException: " + filename;
System.out.println ("Exception encountered " + errorString);
}
}
}
generated the following output:
D:\HOME\CBAILEY\PROJ\JAVA>od -cx utf8file.txt
0000000000 \0 001 002 003 004 005 006 \a \b \t \n \v \f \r 016 01=
7
0100 0302 0504 0706 0908 0B0A 0D0C 0F0=
E
0000000020 020 021 022 023 024 025 026 027 030 031 032 033 034 035 036 03=
7
1110 1312 1514 1716 1918 1B1A 1D1C 1F1=
E
0000000040 ! " # $ % & ' ( ) * + , - . =
/
2120 2322 2524 2726 2928 2B2A 2D2C 2F2=
E
0000000060 0 1 2 3 4 5 6 7 8 9 : ; < =3D > =
?
3130 3332 3534 3736 3938 3B3A 3D3C 3F3=
E
0000000100 @ A B C D E F G H I J K L M N =
O
4140 4342 4544 4746 4948 4B4A 4D4C 4F4=
E
0000000120 P Q R S T U V W X Y Z [ \ ] ^ =
_
5150 5352 5554 5756 5958 5B5A 5D5C 5F5=
E
0000000140 ` a b c d e f g h i j k l m n =
o
6160 6362 6564 6766 6968 6B6A 6D6C 6F6=
E
0000000160 p q r s t u v w x y z { | } ~ 17=
7
7170 7372 7574 7776 7978 7B7A 7D7C 7F7=
E
0000000200 ? ? ? ? ? ? ? ? =8F=AB=B4 ? ? ? ? =
? ? ?
3F3F 3F3F 3F3F 3F3F 3F88 3F3F 3F3F 3F3=
F
0000000220 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? =
?
3F3F 3F3F 3F3F 3F3F 3F3F 3F3F 3F3F 3F3=
F
0000000240 =8F=AB=A1 ? ? ? =8F=AB=D0 ? ? ? ? ? ? =
? ? =8F=A2=C2 ? ?
3FA0 3F3F 3FA4 3F3F 3F3F 3F3F AD3F 3F3=
F
0000000260 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? =
?
3F3F 3F3F 3F3F 3F3F 3F3F 3F3F 3F3F 3F3=
F
*
0000000320 ? ? ? ? ? ? ? =8F=AB=E4 ? ? ? ? ? =
? ? ?
3F3F 3F3F 3F3F 813F 3F3F 3F3F 3F3F 3F3=
F
0000000340 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? =
?
3F3F 3F3F 3F3F 3F3F 3F3F 3F3F 3F3F 3F3=
F
0000000360 ? ? ? ? ? ? ? =8F=AB=B1 ? ? ? ? ? =
? ? ?
3F3F 3F3F 3F3F 823F 3F3F 3F3F 3F3F 3F3=
F
0000000400
I expected the character 'A' to be encoded as x"C1", 'B' as x"C2", etc. and=
numbers
as x'F0" for 0, x'F1' for 1 and so on.
(Review ID: 37955)
======================================================================