code: private String findCharsetInHeader(final GedObject gob) {
          for (final GedObject hgob : gob.getAttributes()) {
              if ("Character Set".equals(hgob.getString())) {
                  return ((Attribute) hgob).getTail();
              }
          }
          return "UTF-8";
      }
docs: Find the GEDCOM charset in the attributes of the header.
  
  @param gob the header ged object
  @return the GEDCOM charset