Changeset: 22daae4c1e28 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=22daae4c1e28
Modified Files:
        clients/mapiclient/mclient.c
Branch: client-filetrans
Log Message:

Encode output files if necessary.


diffs (20 lines):

diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -3115,6 +3115,16 @@ putfile(void *data, const char *filename
        if (filename != NULL) {
                if ((priv->f = open_wastream(filename)) == NULL)
                        return "cannot open file";
+#ifdef HAVE_ICONV
+               if (encoding) {
+                       stream *f = priv->f;
+                       priv->f = iconv_wstream(f, encoding, mnstr_name(f));
+                       if (priv->f == NULL) {
+                               close_stream(f);
+                               return "cannot open file";
+                       }
+               }
+#endif
                if (buf == NULL || bufsize == 0)
                        return NULL; /* successfully opened file */
        } else if (buf == NULL) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to