docs: protected String getFileEncoding(CmsObject cms, CmsResource file) {
  
          String result;
          try {
              result = cms.readPropertyObject(file, CmsPropertyDefinition.PROPERTY_CONTENT_ENCODING, true).getValue(
                  OpenCms.getSystemInfo().getDefaultEncoding());
          } catch (CmsException e) {
              result = OpenCms.getSystemInfo().getDefaultEncoding();
          }
          return CmsEncoder.lookupEncoding(result, OpenCms.getSystemInfo().getDefaultEncoding());
      }