commit 44da6a029206ec73c90c64038adbf8d300fb582e
Author: Pawel Philipczyk <philipczyk@gmail.com>
Date:   Fri Oct 19 12:27:32 2012 +0200

    Init commit

diff --git a/plugins/iconv.inc b/plugins/iconv.inc
new file mode 100644
index 0000000..3f493ff
--- /dev/null
+++ b/plugins/iconv.inc
@@ -0,0 +1,46 @@
+<?php
+
+/**
+ * @file
+ * Convert charset using iconv function.
+ */
+
+$plugin = array(
+  'form'     => 'feeds_tamper_iconv_form',
+  'callback' => 'feeds_tamper_iconv_callback',
+  'name'     => 'Convert charset',
+  'multi'    => 'loop',
+  'category' => 'Text',
+);
+
+function feeds_tamper_iconv_form($importer, $element_key, $settings) {
+  $form = array();
+  $charset_options = array(
+    'ISO-8859-1'    => 'ISO-8859-1',
+    'ISO-8859-2'    => 'ISO-8859-2',
+    'UTF-8'         => 'UTF-8',
+    'Windows-1250'  => 'Windows-1250',
+    'Windows-1252'  => 'Windows-1252',
+  );
+  $form['charset_from'] = array(
+    '#type' => 'select',
+    '#title' => t('From'),
+    '#description' => t('The source value charset.'),
+    '#required' => TRUE,
+    '#options' => $charset_options,
+    '#default_value' => isset($settings['charset_from']) ? $settings['charset_from'] : 'Windows-1250',
+  );
+  $form['charset_to'] = array(
+    '#type' => 'select',
+    '#title' => t('To'),
+    '#description' => t('The target value charset.'),
+    '#required' => TRUE,
+    '#options' => $charset_options,
+    '#default_value' => isset($settings['charset_to']) ? $settings['charset_to'] : 'UTF-8',
+  );
+  return $form;
+}
+
+function feeds_tamper_iconv_callback($result, $item_key, $element_key, &$field, $settings, $source) {
+  $field = iconv($settings['charset_from'], $settings['charset_to'], $field);
+}
