My drupal version is : 7.5x

I want to import an csv or txt file that have non-unicode (iransystem) encoding.

After import this file to Drupal (persian character with iransystem encoding) my characters show correctly in my site. So these texts are imported successfully. But when I want to filter results of those fields by Views (exposed filter), I can not see any result by filtering views fields (search in fields by views exposed filter).

I want to import non-utf8 or unicode persian text files into Drupal and filter those fields by Views exposed filter (search on non-unicode characters).

For example I imported A Persian or arabian word into a field of Drupal. This passage shows correctly to me, but when I search type this passage in exposed A Persian or arabian word text in Drupal page and paste on search field of Drupal Views, I can see results correctly.

  • What is your actual question? Something that ends with a "?". Note that some moderators do not consider the question title as the actual question. Some maybe explicitely repeat the title in your question, eg at the bottom of it. Good luck! Commented Jan 29, 2017 at 10:24
  • i cant speak english correctly,so I am sory ! highlighted texts is as persian texts.i can not type persian characters in this website.
    – omiti
    Commented Jan 29, 2017 at 11:52
  • No need for sorry, don't worry. And your english is pretty well. Also know that my prior edit of your question (to remove some typos, etc) was just to help you improve your question. But you really need to add an actual question in the body of your question. If you don't, your question is at risk of being put on hold like "unclear what you're asking". By adding such question, you avoid that somebody answers to the wrong question. OK? Commented Jan 29, 2017 at 12:14

2 Answers 2


I can only provide high-level guidance here, but you need to use the Feeds Tamper module, which allows you to alter data between when it is read from the source, and then passed to Feeds.

However, I don't think there is an existing tamper plugin that can handle your situation; you will have to create your own.

There are two patches in the issue queue that may provide guidance:

You can take one of those two patches, and update them to use your character set instead of the ones in the patch.

For example, in this patch, you would need to update

+function feeds_tamper_utf8_encode_callback($result, $item_key, $element_key, &$field, $settings, $source) {
+  $field = drupal_convert_to_utf8($field, 'ISO-8859-1');

to use your encoding name instead of 'ISO-8859-1'.

  • thank you mpdonadio , My exported excel files have DOS Codepage (Iransystem Is a DOS codepage link For persian texts.My exported files show in my excel correctly , when I convert it to csv by notepad and import to drupal by feeds those text show correctly too BUT can not filter these character and search,when type persian characters can not see any results.DOS codepage is 8bit and Unicode codepage is 16bit.sorry I can not understand english very well.This patches can convert DOS Codepage to Unicode?!
    – omiti
    Commented Jan 30, 2017 at 5:07
  • This link exported excel file is my file for import by feeds.this file show correctly in excel ,imported successfully to drupal by feeds_xls,show on my site correctly BUT I can not search on those characters (type and search by views exposed filter).please help me and import this file to your drupal site for test,create a views for those 2 fields and search by views on this.you must no have any results.please test this file.your test and check can help me and drupalers very much.thanks
    – omiti
    Commented Jan 30, 2017 at 5:59

My File is Unicode file.because it shows in microsoft excel and other programs correctly.But I think my file and my export is the Basic Problem.

So I delete those files and stop importing those to drupal.

thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.