docs: @FFDCIgnore(Exception.class)
      public void processUnicodeSettings(EntityManagerFactory emf, PersistenceServiceUnitConfig conf) {
          DataSource ds = conf.getJtaDataSource();
          // If the consumer configured unicode, or no datasource noop.
          if (conf.getAllowUnicode() != null || ds == null) {
              return;
          }
  
          DatabasePlatform db = null;
          AbstractSession session = null;
          try {
              // This call will attempt to login. If we don't have a valid datasource this call
              // will blow up. Need to think more about refactoring / adding another user facing
              // method to avoid doing this at all in cases of ddlGeneration
              db = emf.unwrap(DatabaseSessionImpl.class).getPlatform();
              session = emf.unwrap(AbstractSession.class);
          } catch (Exception e) {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "caught an exception trying to unwrap an emf. Possibly no connection?", new Object[] { e });
              }
              return;
          }
          Boolean supports = supportsUnicodeStaticCheck(ds);
          if (supports == null) {
              // No configuration so we're going to defer to the detected/configured platform.
              // Update config if the platform says that it supports calling get/setNString().
              // Don't do anything if not as filtering is on by default.
              if (db.shouldUseGetSetNString()) {
                  supports = Boolean.TRUE;
              }
          }
  
          // If this platform supports unicode, we need to remove the filtering.
          if (Boolean.TRUE.equals(supports)) {
              // create copy to avoid ConcurrentModificationException
              SessionEventManager sem = session.getEventManager();
              for (SessionEventListener sel : new ArrayList<SessionEventListener>(sem.getListeners())) {
                  if (sel instanceof PsSessionEventListener) {
                      if (tc.isDebugEnabled()) {
                          Tr.debug(tc, "removing unicode filter", new Object[] { sel });
                      }
                      ((PsSessionEventListener) sel).removeWrappingConnector(session);
                      sem.removeListener(sel);
                  }
              }
          }
      }