[Might be a TC (seems any version) bug - Multi-rename tool ] Loading long unicode names from UTF16-LE truncates the name
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [Might be a TC (seems any version) bug - Multi-rename tool ] Loading long unicode names from UTF16-LE truncates the
I can confirm the problem. I was using a 259 character buffer for the UTF-8 representation of the loaded strings.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [Might be a TC (seems any version) bug - Multi-rename tool ] Loading long unicode names from UTF16-LE truncates the
But the names are truncated long before the limit of 259 is reached. It doesn't match if I consider 2 or 4 bytes per character. What am I missing?
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [Might be a TC (seems any version) bug - Multi-rename tool ] Loading long unicode names from UTF16-LE truncates the
The string length was chosen for ANSI names, because a name in a directory can't be longer than 255 characters. However, Unicode (UTF-16) names on NTFS can also be 255 characters long - and converted to UTF-8, it can be much longer than 255 characters.
For example, the Japanese file name from this bug report would take 364 characters when saved as UTF-8.
For example, the Japanese file name from this bug report would take 364 characters when saved as UTF-8.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [Might be a TC (seems any version) bug - Multi-rename tool ] Loading long unicode names from UTF16-LE truncates the
This should be fixed in beta 9, please try it!
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [Might be a TC (seems any version) bug - Multi-rename tool ] Loading long unicode names from UTF16-LE truncates the
Works fine now, much appreciated! (I also tried with the "original" utf16-LE as well as utf-8 and both work fine, so the utf8 behavior is unchanged and utf16-LE is fixed).
Re: [Might be a TC (seems any version) bug - Multi-rename tool ] Loading long unicode names from UTF16-LE truncates the
Can confirm it's fixed.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror