#2288 web: decoding failure on rhel8(py36) when custom theme contains non-ascii character
Closed: Dropped by julian8628. Opened by julian8628.

koji uses open($filepath) to access the files. But within httpd, the encoding is always 'ascii'.
When there are any non-ascii chars, the page rending will fail.

We'd better be able to

  • configure the encoding inside koji
  • force the encoding to 'utf-8'

I don't seem to have this issue on Fedora 31 with python 3.7.6. The © char in my extra-footer.html displays fine.

Metadata Update from @mikem:
- Custom field Size adjusted to None

Metadata Update from @julian8628:
- Issue set to the milestone: 1.22

Would you please say more about your environment? Sometimes encoding values are different in a container vs a full VM for example.

this is a RHEL8.2 VM. I'm trying to reproduce it on other RHEL8 env

www/conf/kojiweb.conf has the following comments:

# Python 3 Cheetah expectes unicode everywhere, apache's default lang is C
# which is not sufficient to open our templates
WSGIDaemonProcess koji lang=C.UTF-8

I wonder if this is not taking effect?

I wonder if this is not taking effect?

Ah, I forgot to add WSGIProcessGroup <name> there.

Now it works

Thanks!

Metadata Update from @julian8628:
- Issue close_status updated to: Dropped
- Issue status updated to: Closed (was: Open)

There's probably a UX RFE here.

I wonder how we can remove this foot-gun. Is there any way to set this globally in the WSGI app so that users have no ability to un-set it?

(For better or worse, many Koji administrators end up hard-coding their own httpd config file in their own configuration management (eg. Ansible) repos and they do not always sync up with what we're doing upstream.)

Metadata Update from @tkopecek:
- Issue set to the milestone: None (was: 1.22)

Metadata Update from @jcupova:
- Issue tagged with: testing-done

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/2288

Please continue any further discussion there.

Metadata