Project

General

Profile

Issue resolved : utf-8 characters display issue : might be interesting to you guys

Added by Botu Sun over 10 years ago

Hi,

In short, there has always been utf-8 charset display problems, e.g. French accent letters and Chinese characters are not well displayed.
I have all other config file set to utf-8 but still not working.

See issues here
https://extplorer.net/issues/14
https://extplorer.net/issues/151

I looked into the include/list.php and found file names are encoded in utf-8 with

utf8_encode($item)

with is unnecessary since they were already in utf-8 when read from the file system.
So just replace every "utf8_encode($item)" with just "$item" and all characters are well displayed! At least tested on Chinese and French.

Hopes this could be useful to us all.

Cheers,
Botu


Replies (2)

RE: Issue resolved : utf-8 characters display issue : might be interesting to you guys - Added by Sören Eberhardt-Biermann over 10 years ago

Thank you! I will include the idea behind your fix in the next version.

Sören

RE: Issue resolved : utf-8 characters display issue : might be interesting to you guys - Added by Botu Sun over 10 years ago

Sorry I forgot that in line 229

$abs_item = get_abs_item(utf8_decode($dir), $item);

I also need to change "utf8_decode($dir)" to "$dir" in order to make operations to files within a directory whose name contains utf8 chars.

    (1-2/2)