rejetto forum

unicode support

Guest · 5 · 2913

0 Members and 1 Guest are viewing this topic.

YuJianrong

  • Guest
Hi.

I am a C++ programmer familiar with Unicode programming, I had tried the newest version (2.1d build086) and found it still doesn't support Unicode filename. If the file name contains a character which can not support by the character-set for Non-Unicode program, it will be a "?" on the file page of hfs.

I had reviewed the source and found that the function "findfirst" is used to get the name of the file. If it's similar to the same function in VC++, I think the function cannot support Unicode and that's why the unicode character transformed to "?". In C++ programming, we can use function "_wfindfirst" to get the filename in Unicode (or UCS-2) encoding and then use WinAPI "WideCharToMultiByte" to convert the Unicode string to UTF-8 string for processing. I don't know how to programming in Delphi but I think it's similar to the VC++.

IMHO, If you want to add Unicode filename support for Hfs, I think it's better to add it asap, because the later you add such basic functions, the more bugs you must be faced - I think there are too many parts of the software will be affected by the modification.

However, that's just my opinion, the Hfs now is enough in most situations.

Thanks

Yu Jianrong


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13440
    • View Profile
as you can see, unicode filenames are already in the to-do-list (check the website)



Offline letterboy

  • Occasional poster
  • *
    • Posts: 34
    • View Profile
i totally agree! rejetto have to support unicode file names asap , like when we have chinese and japanese , we still can't gather them , but one thing i still can't understand is , why build#071 can support those unicode filenames(chinese and japanese).So weird.

I dunno if the files are unicode or not , but build #08x can't support them directly.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13440
    • View Profile
i think you are misunderstanding something.

- what Yu is talking about is filenames requiring unicode on your disk.

- most file on your disk DON'T need unicode, even chinese.

- those who need unicode, won't work in HFS at all. you will see ?????? as you add them in the HFS window.

- if you see bad symbols in your browser, but you see right in the HFS window, then that's NOT what Yu is talking about.



the new DEFAULT template is using UTF-8. if you try to use UTF8 with #071, it will just NOT work, because it is supported in newest builds. you will get the same as #071 if you edit the template, so nothing has been removed.

unicode must be supported in several places. HFS just introduced support for the browser-side. the server-side will come later.
« Last Edit: February 28, 2007, 12:19:19 PM by rejetto »