function:PrintWrite-encoding is ASCII- help
in
Programming Questions
•
6 months ago
how I can specify the encoding is ASCII only?
as recorded that coding is ASSII???
When this function detects that the character does not belong ASSI, automatically encoded as UTF-8
here automatically records to txt with encoding ASSII
here automatically records to txt with encoding UTF-8
as recorded that coding is ASSII???
When this function detects that the character does not belong ASSI, automatically encoded as UTF-8
here automatically records to txt with encoding ASSII
- PrintWriter R = createWriter("ASSII/A.txt");
println("OK");
for(int i=1;i<255;i++){
//char ch = (char)i;
println(i);
R.print(i);
}
R.flush(); // Writes the remaining data to the file
R.close();
here automatically records to txt with encoding UTF-8
- PrintWriter R = createWriter("UTF/8.txt");
println("OK");
for(int i=1;i<255;i++){
char ch = (char)i;
println(ch);
R.print(ch);
}
R.flush(); // Writes the remaining data to the file
R.close();
1