skillfed

unicodecsv

Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*.

unicodecsv v0.14.1 6.3M downloads/30d#1,938 on PyPI596
Permissive license BSD License DORMANT released

What it is and what it does

unicodecsv solves a specific problem in Python 2.7: the standard csv module cannot handle Unicode strings without manual encoding workarounds. This package wraps the csv module to accept Unicode input and output transparently, accepting bytestreams (via plain `open(..., 'rb')`) and handling the encoding internally.

The package is designed for Python 2.6, 2.7, 3.3, 3.4, 3.5, and PyPy 2.4.0. It has no runtime dependencies and installs cleanly. However, it is unmaintained since 2015-09-22 and explicitly targets Python 2. Modern Python 3 handles Unicode CSV natively, making this package potentially obsolete for new projects.

Use it for:

  • Maintain legacy Python 2.7 codebases that process CSV files with non-ASCII characters
  • Migrate Python 2 CSV code to a compatible layer before upgrading to Python 3
  • Work with CSV data containing accented characters or non-Latin scripts in Python 2 environments

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Drop-in replacement for Python 2.7's csv module that handles Unicode strings natively, eliminating encoding errors when reading and writing CSV data.

No for new projects. Python 3's csv module handles Unicode natively. The package is dormant (last release 2015-09-22) with no security vulnerabilities, but installing it on modern Python versions is unlikely to work or be necessary. If you must support Python 2.7 legacy code, it is a reasonable choice given its permissive BSD License and zero dependencies.

Install

unicodecsv on PyPI

pip

pip install unicodecsv

uv

uv add unicodecsv

poetry

poetry add unicodecsv

Installing unicodecsv

Before you install

High install friction due to age and Python 2 focus. Last release was 2015-09-22; maintenance is dormant. No runtime dependencies ease installation.

License in practice

BSD License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

import unicodecsv as csv
from io import BytesIO

f = BytesIO()
w = csv.writer(f, encoding='utf-8')
w.writerow((u'é', u'ñ'))
f.seek(0)
r = csv.reader(f, encoding='utf-8')
row = next(r)  # [u'é', u'ñ']

Designed for Python 2.6, 2.7, 3.3, 3.4, 3.5, and PyPy 2.4.0. Requires bytestream input (open in 'rb' mode), not text mode.

Verify before relying

  • Whether this package is still necessary given Python 3's native Unicode CSV support
  • Current compatibility with Python versions beyond 3.5, if any
  • Whether the package works reliably on modern Python 3 interpreters despite dormant maintenance

Package facts

License BSD License (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 3,979 days since the last release
Last repo commit
First released
Downloads 6,289,635/month — #1,938 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: unicodecsv-0.14.1.tar.gz

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

python 2 csv unicode supportcsv module unicode stringsunicode csv reader writerpython 2.7 csv encodingcsv unicode replacement
python-2-legacycsv-unicode

More Text Processing packages