Answers for "encode text file to utf-8 python"

1

python write txt utf8

import codecs

file = codecs.open("lol", "w", "utf-8")
file.write(u'\ufeff')
file.close()
Posted by: Guest on March-30-2021
0

encode file to utf-8 in java

String charset = "ISO-8859-1"; // or what corresponds
  BufferedReader in = new BufferedReader( 
      new InputStreamReader (new FileInputStream(file), charset));
  String line;
  while( (line = in.readLine()) != null) { 
    ....
  }
Posted by: Guest on June-26-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language