kotx / render

Cloudflare Worker to proxy and cache requests to R2
MIT License
384 stars 85 forks source link

Chinese characters may display as garbled text #29

Closed IlluminateDarkheat closed 1 year ago

IlluminateDarkheat commented 1 year ago

The possible reason is that the Chinese characters encoded in UTF-8 were read in GBK format.

An example: 搴斿鐗规畩鏃舵湡鐨勫簲鎬ョ墿璧勬竻鍗晇1.2.pdf Actually should be: 应对特殊时期的应急物资清单v1.2.pdf

kotx commented 1 year ago

Is this in a file listing or in an HTML file or something else?

IlluminateDarkheat commented 1 year ago

Is this in a file listing or in an HTML file or something else?

I'm not quite sure, do you mean the configuration here?

kotx commented 1 year ago

Where are you seeing that Chinese characters are garbled? Is it in a file served by render?

IlluminateDarkheat commented 1 year ago

On the page of Workers.

I'm not sure if render will generate a file in the R2 bucket, maybe there is something wrong with my configuration?

kotx commented 1 year ago

Just pushed a commit that ensures the directory listing is parsed as UTF-8, (version 1.1.3), let me know if it works.

IlluminateDarkheat commented 1 year ago

Everything is fine now. Thank you very much for your work!