Solve Chinese URL in Workers?

This is my URL:中文/, it gives the error message could not find categories/%E4%B8%AD%E6%96%87/index.html in your content namespace. That’s because the path to be accessed is supposed to be categories/中文/index.html in which 中文 is translated to %E4%B8%AD%E6%96%87 in URL. I think it is not translated back when accessing a directory, is there a way to fix it?

In Chrome console, type


It should display


Yes it is. The browser tries to access a folder called “% E4% B8% AD% E6%96%87” which does not exist, instead it should be accessing “中文”. Not sure what happened here but my local deployment does not have that issue, so i suppose it to be on the Workers’ side

Do you have control on your worker ?
If yes, decode the url in the worker before accessing the value in KV (which mimics your folder).
If no, and if you use Workers Sites, then it means Cloudflare Team has to modify their code.

I think I’m using Workers Sites - I’m using wrangler to deploy my blog to the Workers.
I guess I should leave the thread here for the Cloudflare team to check. Thank you for all the help and suggestions!

This might be related: