• Resolved Phan Duy Nam

    (@phanduynam)


    I am preparing to import a large number of Vietnamese products into WooCommerce using a CSV file. I have a question about character encoding and would like to ask for advice.
    .
    In your experience, should I use UTF-8 or UTF-8-sig when importing Vietnamese product CSVs into WooCommerce? I am not sure which one to use to ensure the import goes smoothly and there are no errors displaying Vietnamese. Are there any special considerations about Vietnamese encoding that I need to know to avoid problems?

    • This topic was modified 4 months, 3 weeks ago by Phan Duy Nam.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thanks for reaching out. I recommend using UTF-8 encoding instead of UTF-8-sig when importing Vietnamese product CSV into WooCommerce. UTF-8 correctly handles Vietnamese characters, while UTF-8 with BOM (UTF-8-sig) can cause import issues due to the extra marker at the beginning of the file.

    Tips to ensure a smooth import:

    • Save CSV in UTF-8: Use a text editor or spreadsheet software to specify UTF-8 encoding and not UTF-8-sig (with BOM — Byte Order Marker) (e.g., Notepad++, Visual Studio Code, LibreOffice Calc).
    • Verify Encoding: Double-check that the file is saved in UTF-8 to prevent character display errors.
    • Test with a Small Sample: Before importing all products, do a trial run with a few entries to ensure Vietnamese characters display correctly.

    No special considerations beyond using standard UTF-8 are needed, as it fully supports Vietnamese characters.

    Thanks,

    R

    Thread Starter Phan Duy Nam

    (@phanduynam)

    @rawdreeg When I export a CSV file from woocommerce to my computer and open it with notepad++, the information in that file is utf-8-bom. This is very confusing to me, when exporting it is utf-8-bom, but according to your advice when importing it should be utf-8. Also, when importing a utf-8-sig encoded CSV product file into woocommerce it takes 30 minutes, while a utf-8 encoded CSV file takes 42 minutes (40% longer). How do you explain this?

    • This reply was modified 4 months, 3 weeks ago by Phan Duy Nam.

    @phanduynam, I had another look, and you’re right—WooCommerce has exported CSV files with UTF-8 BOM (UTF-8-sig) since version 3.2.6. I’d say it makes sense to use UTF-8-sig for importing as well.

    The Byte Order Marker (BOM) in UTF-8-sig files helps WooCommerce recognize the file encoding immediately, which could explain the faster import times. Using the same encoding as WooCommerce’s export ensures better compatibility and fewer issues. ?As always, it’s a good idea to test the import with a small sample first to make sure everything works smoothly.

    Thanks,

    R

    Thread Starter Phan Duy Nam

    (@phanduynam)

    @rawdreeg I tested, in terms of content quality, utf-8 and utf-8-sig are the same, the only difference is that utf-8 is much slower than utf-8-sig. So the conclusion is that I will use utf-8-sig.

    I’m glad to hear that you’ve tested both UTF-8 and UTF-8-sig and found that UTF-8-sig works best for you. Using UTF-8-sig makes sense if it provides faster import times without affecting content quality.

    If you have any more questions or need further assistance, feel free to reach out.

    Best regards,

    R

    Thread Starter Phan Duy Nam

    (@phanduynam)

    @rawdreeg

    but why does woocommerce’s instructions say “CSV file must be in UTF-8 format”?

    https://woocommerce.com/document/product-csv-importer-exporter/

    That’s a great question! If I had to guess, I’d say the WooCommerce documentation specifies that the CSV file must be in UTF-8 format because most users would not differentiate between UTF-8-sig and UTF-8. UTF-8-sig is essentially UTF-8 encoding with an added Byte Order Marker (BOM) at the beginning of the file.

    Since your tests show that UTF-8-sig works better for you without affecting content quality, it makes sense to continue using it.

    Let me know if you have any other questions!

    Thread Starter Phan Duy Nam

    (@phanduynam)

    @rawdreeg I hope you can talk to woocommerce dev to update the documentation about utf-8 bom

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.