Dockerfiles: set LANG=C.UTF-8

Issue #184 to avoid issue with printing UTF-8 text to sidecar
This commit is contained in:
James R. Barlow
2017-08-30 13:25:54 -07:00
parent f6a4d8f1f8
commit 952f0cca15
3 changed files with 10 additions and 2 deletions
+2
View File
@@ -20,6 +20,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
tesseract-ocr-spa \
tesseract-ocr-deu
ENV LANG=C.UTF-8
RUN python3 -m venv --system-site-packages /appenv
# This installs the latest binary wheel instead of the code in the current
+2
View File
@@ -30,6 +30,8 @@ RUN apt-get update \
tesseract-ocr-rus \
tesseract-ocr-chi-sim
ENV LANG=C.UTF-8
RUN python3 -m venv --system-site-packages /appenv
# This installs the latest binary wheel instead of the code in the current
+6 -2
View File
@@ -404,9 +404,13 @@ def test_force_ocr_on_pdf_with_no_images(spoof_tesseract_crash, resources,
@pytest.mark.skipif(
pytest.helpers.is_macos() and pytest.helpers.running_in_travis(),
reason="takes too long to install language packs in Travis macOS homebrew")
def test_french(spoof_tesseract_cache, resources, outpdf):
def test_french(spoof_tesseract_cache, resources, outdir):
# Produce a sidecar too - implicit test that system locale is set up
# properly
sidecar = outdir / 'francais.txt'
p, out, err = run_ocrmypdf(
resources / 'francais.pdf', outpdf, '-l', 'fra',
resources / 'francais.pdf', outdir / 'francais.pdf', '-l', 'fra',
'--sidecar', sidecar,
env=spoof_tesseract_cache)
print(os.environ)
assert p.returncode == ExitCode.ok, \