On 04/05/2016 03:43 PM, Dimitry Sibiryakov wrote: > 04.04.2016 18:13, Alex Peshkoff wrote: >> Method 3 is good when talking about comparison > Unfortunately it seems to be no-go because Firebird::AbstractString is > not template but > a class in contrast with std::string.
On top of it is placed template<typename Comparator> class StringBase : public AbstractString >10 years ago when I was writing fb_string I did not want to place all strng-related code into h-file for many reasons (up to build speed). I've placed most of relatively big methods independent from comparison rules into cpp file. Today if not-template nature of AbstractString is a problem that solution should be changed. And taking into an account that fb_string is not used in performance-critical places - what prevents to use virtual methods for comparison? >> one more related problem. We also have another >> "incarnation" of StringBase<> - NoCaseString. It should be compared >> case-insensitive on any platform. I think that we must solve all string >> problems in complex. How should we work with it? > I'm afraid that to make Firebird work with national characters properly > we have to kill > NoCaseString completely. From a brief look in a half of cases it is used to > work with > ASCII strings only, and the rest have to be fixed because it doesn't work as > it should at all. > From config_file.h: // keys are case-insensitive typedef Firebird::NoCaseString KeyType; What will we do with that? Yes currently all keys are ASCII but it's used also for plugins configuration and I see no reasons why national characters can't arrive there. ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel