rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: nutarun on November 09, 2021, 08:49:05 AM

Title: Addin folder or file (Thai language) to HFS but their name is turned out to ????
Post by: nutarun on November 09, 2021, 08:49:05 AM
I add folder or file (Thai language) to HFS but their name is turned out to ? ? ? ?

What am I supposed to do or check ?

My server also install Thai font already.

Thank you
Title: Re: Addin folder or file (Thai language) to HFS but their name is turned out to ????
Post by: NaitLee on November 10, 2021, 10:44:33 AM
Firstly, your Windows system language is English, which means that the "code page" is maybe also English-only.
As HFS 2.3 is non-Unicode, you should change the system code page to Thai (or relative) -compatible, then the problem may be solved.

Here's a related link (https://stackoverflow.com/questions/14653176/is-it-possible-to-set-ansi-encoding-per-application-in-windows), all answers inside are helpful.

After changing, please re-launch Windows & HFS and put the folders again.

( many terminologies here  ::) search the web for more information )

Then, if above didn't work, may try HFS version 2.4, which supports Unicode. Find its development/download link in "Beta" sub-board.


Last note: HFS 2.3e is an insecure & vulnerable version. Switch to 2.3m or above if possible ;)
Title: Re: Addin folder or file (Thai language) to HFS but their name is turned out to ????
Post by: LeoNeeson on November 10, 2021, 04:35:40 PM
As HFS 2.3 is non-Unicode, you should change the system code page to Thai (or relative) -compatible, then the problem may be solved.
This is true, HFS 2.3 is not Unicode, so changing system code page will not solve this. The only way is using HFS 2.4, but before doing that, please backup any *.ini, *.vfs and *.tpl files you may have along your HFS.exe executable (if you update to version 2.4, then you can't go back to v2.3, unless you have a backup).
Title: Re: Addin folder or file (Thai language) to HFS but their name is turned out to ????
Post by: NaitLee on November 11, 2021, 04:16:10 AM
so changing system code page will not solve this.

Yes, this only works with "common" encodings, such as Chinese & Japanese, but not Thai.
Use HFS 2.4 if possible ;)



In my test, after changing code page to Thai, a folder named "อรุณสวัสดิ์" can be put into HFS 2.3, but the URL Encode result (which should to UTF-8) is incorrect.

According to further test, these are the conversion steps of HFS 2.3 (or Delphi without Unicode):
- Windows think this program cannot understand UTF-16 (the filename encoding of NTFS) and converts that to ANSI Thai "code page": TIS-620
- HFS 2.3 regarded this TIS-620 raw data as GB2312 encoded
- Then convert the raw data to UTF-8 with GB2312 map
which will succeed the action but get wrong data :P

So this problem cannot be solved in 2.3 unless we have a hack in the old Delphi, add the TIS-620-to-UTF-8 map, be sure it will be correctly used, then re-compile...
Too complex then just upgrade to HFS 2.4 :D

Ps. encoding test can be done with Notepad++ on Windows, or any good editor on GNU/Linux. Also the command-line utility "hexdump" can show you the true raw data of a file.
Title: Re: Addin folder or file (Thai language) to HFS but their name is turned out to ????
Post by: nutarun on November 11, 2021, 08:01:12 AM
Thank you both of you.  :)

I try 2.4.0 RC6 and it work like a charm. :D

I thought 2.4 is still Beta version and not ready to use it.