Basic support for Unicode file names and some bugfixes#15
Basic support for Unicode file names and some bugfixes#15aafemt wants to merge 4 commits intoFirebirdSQL:masterfrom
Conversation
| @@ -411,10 +411,10 @@ namespace Firebird | |||
| } | |||
| void insert(size_type p0, const_pointer s, const size_type n) | |||
| { | |||
There was a problem hiding this comment.
IMO this fix should be done as separate pull request and backported to 2.5 and 3.0.
There was a problem hiding this comment.
No, this is regression of this branch, problem does not exist in other branches.
There was a problem hiding this comment.
On 06/16/2016 07:58 PM, Dimitry Sibiryakov wrote:
@@ -411,10 +411,10 @@ namespace Firebird
}
void insert(size_type p0, const_pointer s, const size_type n)
{
No, this is regression of this branch, problem does not exist in other branches.
OK, in that case no problems.
|
Why just not use boost::filesystem and remove tons of code? |
|
What issue the last commit (2f89d89) solved ? Just for fun ? |
|
It got rid of magic numbers before Adriano requested that. |
|
Size of |
|
So, strlen also will be calculated at compile time. But in contrast with sizeof it will
return right value, not size of pointer.
|
|
|
|
Because compilers are clever nowadays.
|
|
It will probably require modern |
String refactoring as requested by Alex.
| a3.printf("GroupName=%s\n", U.PLG$GROUP_NAME); | ||
|
|
||
| attr = a1 + a2 + a3; | ||
| attr = a1; |
There was a problem hiding this comment.
This change has nothing to do with unicode support
There was a problem hiding this comment.
Specially strange taken together with introduced by you assignment operator using rvalue reference. With this c++11 feature I see absolutely no sense in this change.
| SpecificAttributesMap* map); | ||
|
|
||
| static string convertAsciiToUtf16(const string& ascii); | ||
| static string convertAsciiToUtf16(const char* ascii); |
There was a problem hiding this comment.
What's a reason in using here plain char pointer instead class reference?
Yes, this is result of string refactoring which you demanded. |
This routine used to be called using string literal. Creating of temporary class is |
This operator has no advantage on short strings which fit into internal buffer. That's why |
| } | ||
|
|
||
| AbstractString& append(const AbstractString& str) | ||
| void append(const AbstractString& str) |
There was a problem hiding this comment.
Rollback this massive changes from 'AbstractString&' to 'void' return type. Not related with unicode support (and violate syntax of std::basic_string).
There was a problem hiding this comment.
These routines are private. They cannot be called from outside code and have nothing to do with public interface of std::basic_string except name. Their public envelopes in derived classes return reference to instance of proper class.
|
On 10/18/16 14:00, Dimitry Sibiryakov wrote:
Anyway rollback that "optimization". |
| if (dladdr((void*) &allClean, &path)) | ||
| { | ||
| name = path.dli_fname; | ||
| name += ".memdebug.log"; |
There was a problem hiding this comment.
Use of function call instead redefined operator does not make code better.
Rollback such changes too.
| T pop() | ||
| { | ||
| T* pntr = inherited::pop(); | ||
| T rc = *pntr; |
There was a problem hiding this comment.
And how is THIS related to unicode support?
May be correct change, but... not here.
It makes code working. As was agreed in firebird-devel, the function doesn't add directory |
|
Dmitry, I stop review. If you continue playing with names I will have to close your PR which will be very bad cause in many aspects it is useful. |
|
On 10/18/16 14:19, Dimitry Sibiryakov wrote:
OK, agreed. |
|
On 10/18/16 15:31, Dimitry Sibiryakov wrote:
They are protected. Am I undestand it right that
Class string was initially designed to be able to serve as a replacement I.e. to be precise - not only name but name and functionality. |
Yes.
Isn't chained code like "a.append("abc").append("def").c_str()" prohibited by project's style guides?.. |
|
On 10/18/16 15:48, Dimitry Sibiryakov wrote:
May be - but I do not know about it. |
But Adriano called them "ugly and non-sense", didn't he?.. |
|
On 10/18/16 15:55, Dimitry Sibiryakov wrote:
Do not think so - he is actively them. For example, in SQL builder. |
|
|
||
| for (burp_fil* file = tdgbl->gbl_sw_files; file; file = file->fil_next) | ||
| { | ||
| if (file->fil_name != file_name) |
There was a problem hiding this comment.
Why this change?
Are we missing operator!=()?
|
Are we missing operator!=()?
Yes.
|
Unicode file names and pathes work at API level. Little glitches can be fixed after Pavel Zotov create test suite.
Much more must be done for unicode support in utilities command lines.