On 04/03/2016 05:04 PM, Dimitry Sibiryakov wrote: > Hello, All. > > While working on unicode file names (repo aafemt/firebird, branch > unicode), I've stuck > on comparisons of file names (during databases.conf handling for example). > On Windows it is supposed to be case insensitive, but current > implementation of > Firebird::PathName cannot handle utf-8. > I see three options: > > 1) Change comparison function to convert both strings into unicode and perform > case-insensitive comparison. Small code changes, very big overhead. > 2) Convert strings to uppercase ASAP and perform case-sensitive comparison. > Little > overhead, many changes in code. > 3) Change PathName to contain unicode strings and perform case-insensitive > comparison. > Potentially even smaller overhead, even bigger code changes. > > Opinions? >
Method 2 is IMO non-starter at all. If we store all strings in uppercase this will end with creating of DB.FDB instead db.fdb. Or I miss something here? Method 3 is good when talking about comparison, but for all other usages we will have conversion overhead almost for nothing. Not sure that overall result will be so efficient. Or you talk about always using unicode (suppose, you mean unicode16) strings in firebird, not utf8? I.e. I think you should concentrate on minimizing overhead in method 1. ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel