Skip to content

Commit 169e7d2

Browse files
committed
Merge branch 'master' into fix-build
2 parents 99a1912 + 62dbc4c commit 169e7d2

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
19-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
19+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
2020

2121
steps:
2222
- uses: actions/checkout@v5

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ To install the module use
1717

1818
This module package requires at least Python 3.6, a corresponding version of
1919
libffi and the native iconv library.
20+
It is only tested with Python 3.8 and higher though.
2021

2122
Module iconv
2223
------------

iconvcodec.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,14 @@ def _iconv_decode_impl(decoder, msg, errors, bufsize=None):
8080

8181

8282
def codec_factory(encoding):
83-
encoder = iconv.open(encoding, "utf-8")
84-
decoder = iconv.open("utf-8", encoding)
83+
# Workaround for https://github.com/bodograumann/python-iconv/issues/4
84+
_encoding = encoding \
85+
.replace("_translit", "//TRANSLIT") \
86+
.replace("_ignore", "//IGNORE") \
87+
.replace("_non_identical_discard", "//NON_IDENTICAL_DISCARD")
88+
89+
encoder = iconv.open(_encoding, "utf-8")
90+
decoder = iconv.open("utf-8", _encoding)
8591

8692
def encode(inp, errors="strict"):
8793
msg = inp.encode()

0 commit comments

Comments
 (0)