public String getUsedEncodingName(TLanguageFile file)
  {
    String back = "ISO-8859-1" ;
    if (file != null)
    {
      // not WYSIWYG mode or the encoding is java utf with escape sequences
      if ( !settings.getSaveWYSIWYGmode() ||
           ( TEncodingList.isJavaEncoding( file.getDefaultEncoding() ) ) )
      {
        back = "ISO-8859-1" ;
      }
      else // WYSIWYG mode
      {
        back = file.getDefaultEncoding() ;

        // valid ?
        if ( ( back == null ) || ( back.length() < 1 ) )
          back = "ISO-8859-1" ;
      }
    }
    return back ;
  }