Gemalto is now part of the Thales Group, find out more.

You are here

character encoding on EHSx | Thales IoT Developer Community

September 5, 2018 - 11:45am, 2648 views


I have 2 different projects where I need to read a String from a text(txt) file on the module. One is with the TC65i and one with the EHS8.

When reading with the EHS8 I can’t read ‘characters like ä, ü and ö. With the TC65i I don’t have this issue when using the exact same code.

In the example below I have a text file (file:///A:/textfile.txt)  with the 3 characters above in it. When I read and output them or send them by SMS I only get question marks.

Am I missing something?


public static void read_file(){

        try {

              FileConnection fconn = (FileConnection)"file:///A:/textfile.txt", Connector.READ_WRITE);

              if (!fconn.exists())


System.out.println("file not found");               




                    InputStreamReader fdi = new InputStreamReader(fconn.openInputStream(), "ISO_8859_1");

                    int ch;                   


                    while ( (ch = != -1) {








         catch (Exception ex)


System.out.println("Exception found: " + ex.toString() + "\r");