Support » Plugin: Import all XML, CSV & TXT into WordPress » unable to import posts with chinese characters

  • Resolved charleschanhk


    Dear Plugin owner,

    I am facing a problem that the chinese characters in post content / title / tags are not properly imported. The file is already encoded in UTF-8 with correct format. The import is successfully finished but with the problem described as below.

    If I have a field value (say, post_content) as


    it will result in a eee局局局eee局局局局局, that is, all chinese characters before the first english character are dismissed.

    If it is a value of all chineese characters, the imported field value will be empty. If it is a all english value, every thing works fine.

    Please help on the issue. Look forward to your reply.

    All the best,
    Charles Chan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Smackcoders Support


    Hi Charles,

    Can you please make sure it is encoded in UTF-8 correctly?

    We suggest you use Google Sheets, Import your CSV into the Google Sheets, download as CSV. If you are using Windows, Please upload the CSV without opening it in Excel. It may cause you problems with delimiters.

    Smackcoders Support.

    Thread Starter charleschanhk


    I figured out a tweak to make it works.

    In WPImporter_includes_helper.php, before calling fgetcsv(), I added

    setlocale(LC_ALL, ‘en_US.UFT8’);

    and it works like a charm.

    I wonder how should I set the default locale for php environment so that I don’t have to tweak the plugin codes. I have set

    intl.default_locale = en_US.UTF-8

    in /etc/php.ini but no help. My WordPress uses traditional Chinese in setting and I would like it to be reserved unchanged.

    Plugin Contributor Smackcoders Support



    We have released a newer version. Please upgrade to the newer version. You will be able to import even without these tweaks.

    I will also provide you a Sample CSV that we tested with.

    • This reply was modified 5 years, 6 months ago by Smackcoders Support. Reason: link anchor tag change
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘unable to import posts with chinese characters’ is closed to new replies.