After upgrading to NodeBB 4.6, Chinese filenames show as garbled text in the admin panel, while displaying correctly on the frontend.
Issue: Upload Chinese-named files → frontend shows correctly Admin panel displays random characters instead of Chinese text Works fine in NodeBB 4.2, broken after 4.6 upgrade
This appears to be a regression in filename encoding handling specific to the admin interface. The actual files work properly - only the display is affected.
Environment: Ubuntu, C.UTF-8 locale, MongoDB. Requesting investigation into this encoding issue that affects Chinese content management in the admin panel.
12 Comments
baris@community.nodebb.org · 1 pts · 290d
LWSH6688 you can try applying this commit for a fix https://github.com/NodeBB/NodeBB/commit/9410f466d80b30f52e5f926e5d17a513beec1084
lwsh6688@community.nodebb.org · 1 pts · 290d
For example, the Chinese name of this image also appears garbled in the backend, but it displays correctly on the front end.
lwsh6688@community.nodebb.org · 1 pts · 290d
NodeBB version 4.4 could display the names correctly, but after upgrading to version 4.6, the names of newly uploaded files became garbled.
lwsh6688@community.nodebb.org · 1 pts · 290d
Thank you. I will upgrade promptly when the next version is released.
codexa@community.nodebb.org · 1 pts · 284d
hey, it’s a small bug from the new upload handler. just update to latest build or apply the recent fix and it will show chinese names fine again.
jonathanrdd@community.nodebb.org · 1 pts · 255d
LWSH6688 It’s likely a UI side regression rather than a storage issue, since the frontend still renders the filenames correctly. Check that the admin page is actually being served with UTF 8 headers, then compare the output with the filename shown in the database to confirm it is only a display layer problem. If everything matches, open a GitHub issue with your environment info, because this looks like something the core team will need to patch in the 4.6 admin interface.
baris@community.nodebb.org · 1 pts · 290d
Can you provide a sample text file? Maybe upload one to this post.
lwsh6688@community.nodebb.org · 1 pts · 290d
Files with Chinese names display garbled characters when uploaded.
lwsh6688@community.nodebb.org · 1 pts · 290d
The backend should display it as 1761314038073-截图.png
baris@community.nodebb.org · 1 pts · 290d
on this it looks like this and on the backend it looks like below. Not sure if it's supposed to be different.baris@community.nodebb.org · 1 pts · 290d
Yeah looks like it started with the change from connect-multiparty to multer in https://github.com/NodeBB/NodeBB/commit/385f4f12be4dbd41832bebbe043288ee524a1bee, will take a look. Thanks for reporting.
baris@community.nodebb.org · 1 pts · 290d
And it was working that way in 4.2.0? I will see if I can find the commit that changed that.