Server encoding $ dollar sign character in MZ?

Hi, my game is working fine when I test on my local machine, but images with $0_ prefix are somehow getting encoded on the server.

Example:

Filename $0_arrowMark.png as referenced in the Event editor:

Screen Shot 2022-01-14 at 5.08.35 pm.png


The name of the image file does NOT get encoded on the server:

Screen Shot 2022-01-14 at 5.14.34 pm.png


But when I run the game, I get this error when attempting to load the Map:

Failed to load
img/characters/%240_arrowMark.png

Screen Shot 2022-01-14 at 5.13.36 pm.png


Would love any help on this. Thanks!
Are you on linux?

Can you start a brand new project, make a single map with the outside of a house and add one of the $Door sprites to an event? Then deploy it and see if you have the same issue.
Are you on linux?

Can you start a brand new project, make a single map with the outside of a house and add one of the $Door sprites to an event? Then deploy it and see if you have the same issue.
yes that's exactly right - linux. I'll try that thank you
yes that's exactly right - linux. I'll try that thank you
Figured it out!

the issue is in js/rmmz_sprites.js

ImageManager.loadBitmap = function (folder, filename) { if (filename) { const url = folder + Utils.encodeURI(filename) + '.png'; return this.loadBitmapFromUrl(newUrl); } else { return this._emptyBitmap; } };

that Utils.encodeURI, it encodes the $ character

so it just needs to be de-encoded it by adding this line
const newUrl = url.replace('%24', '$')

Original thread: https://forums.rpgmakerweb.com/threads/server-encoding-dollar-sign-character-in-mz.143951/