trac 1.6 error unknown encoding: utf8mb4

40 views
Skip to first unread message

pleo87508

unread,
Jul 1, 2024, 10:05:19 PMJul 1
to Trac Users
Hello,
I've struggled to move an old trac 1.2 wiki, ticket and repo browser from CentOs 7 to ubuntu 24.04.  
I have everything almost working now though.
I first had to move the subversion rep, now on 1.14.
Then I installed trac 1.6 and upgraded the database using trac-admin.
I think before I did that I recreated the db from a backup, but changed the character set and collation to 
DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin
I thought I read on the trac site that that needed to be done.

After the wiki and tickets seemed to be working, I used the admin interface to set up the repository browser.
All of that is working except when I drill down and click on the revision (changeset maybe) and or the file, I get the following error:
Trac detected an internal error:LookupError: unknown encoding: utf8mb4
onthe web browser.
Maybe I picked the wrong character set and colation?
If so what should it be

Am attaching a pdf of the output from the webpage.  I can also post the logs if that will help
Thanks in advance.
 
2024-7-1-trac-error-utf8mb4-encoding.pdf

Jun Omae

unread,
Jul 1, 2024, 11:35:17 PMJul 1
to trac-...@googlegroups.com
If you've configured [trac] default_charset to "utf8mb4" in
$ENV/conf/trac.ini, that is incorrect and the root cause of the issue.
Change the option with "utf-8". Otherwise, I guess your trac.ini has
something wrong. Please share your trac.ini.
--
Jun Omae <jun...@gmail.com> (大前 潤)

pleo87508

unread,
Jul 2, 2024, 10:33:25 AMJul 2
to Trac Users
Thank you. That was the issue.  I set default_charset in trac.ini back to utf-8, and that issue has bee resolved.

I have one more question re: creating a hook for subversion to enable changeset updates.
Should I post another message to the group, or continue with this thread
Best,
Paul

Jun Omae

unread,
Jul 2, 2024, 8:17:32 PMJul 2
to trac-...@googlegroups.com
Firstly, see https://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync
If you still have questions, please start a new thread.
Reply all
Reply to author
Forward
0 new messages