docs: private boolean needUtf8Marker(CmsResource res) {
  
          if (!m_addByteOrderMark) {
              return false;
          }
          // if the encoding of the resource is not UTF-8 return false
          String encoding = CmsLocaleManager.getResourceEncoding(m_cms, res);
          boolean result = false;
          if (CmsEncoder.ENCODING_UTF_8.equals(encoding)) {
              try {
                  I_CmsResourceType resType = OpenCms.getResourceManager().getResourceType(res.getTypeId());
                  if (resType instanceof CmsResourceTypeJsp) {
                      result = true;
                  } else if (resType instanceof CmsResourceTypePlain) {
                      result = true;
                  } else if (resType instanceof CmsResourceTypeXmlContent) {
                      result = true;
                  } else if (resType instanceof CmsResourceTypeXmlPage) {
                      result = true;
                  }
              } catch (CmsLoaderException e) {
                  LOG.debug(e);
              }
          }
          return result;
      }