+/** Allows to change the encoding for writing files. It should be called
+ \em before calling gedcom_write_open(), i.e. it affects all files that are
+ opened after it is being called.
+
+ Valid values for the character set are given in
+ the first column in the file \c gedcom.enc in the data directory of
+ gedcom-parse (\c $PREFIX/share/gedcom-parse). The character sets UNICODE,
+ ASCII and ANSEL are always supported (these are standard for GEDCOM), as
+ well as ANSI (not standard), but there may be others.
+
+ Note that you still need to pass the correct charset value for the
+ \c HEAD.CHAR tag, otherwise you will get a warning and the value will
+ be forced to the correct value.
+
+ \param from Indicates how you want the encoding to be set. When
+ ENC_FROM_FILE is selected, the other parameters in the function are ignored
+ (they can be passed as 0). ENC_FROM_SYS is not a valid value here.
+ The default setting is ENC_FROM_FILE.
+ \param charset The character set to be used.
+ \param width The width and endianness of the character set. You can
+ pass 0 for non-UNICODE encodings.
+ \param bom Determines whether a byte-order-mark should be written in
+ the file in case of UNICODE encoding (usually preferred because it then
+ clearly indicates the byte ordering). You can pass 0 for non-UNICODE
+ encodings, but the byte-order-mark can also be used for UTF-8.
+
+ \retval 0 in case of success
+ \retval >0 in case of error
+ */
+int gedcom_write_set_encoding(Enc_from from, const char* charset,