read a text file in greek and print it the serial console

edited January 2014 in Using Processing

I am new to prossesing and I have made a simple sketch that reads a .txt file and prints it's content into the console. Unfortunately because the file is in Greek i get messages like "??????" or"▜▜▜▜▜" I have also read this topic http://forum.processing.org/one/topic/read-a-text-file-with-arab-characters.html which seems similar but I didn't have any result. here is my code:

      String filename = "myfile.txt";
      String[] lines = loadStrings(filename);
      println(join(lines, '\n'));

Any help would be much appreciated!

Answers

  • Ensure the file is saved in UTF-8 (no BOM), which is the only encoding Processing is willing to read.

  • edited January 2014

    is it modern greek or classical greek or koiné?

Sign In or Register to comment.