-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic support for Unicode file names and some bugfixes #15
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is regression of this branch, problem does not exist in other branches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -565,7 +567,9 @@ int SecurityDatabaseManagement::execute(Firebird::CheckStatusWrapper* st, Firebi | |||
if (!U.PLG$GROUP_NAME.NULL) | |||
a3.printf("GroupName=%s\n", U.PLG$GROUP_NAME); | |||
|
|||
attr = a1 + a2 + a3; | |||
attr = a1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change has nothing to do with unicode support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -57,7 +57,7 @@ class IntlUtil | |||
static bool parseSpecificAttributes(Jrd::CharSet* cs, ULONG len, const UCHAR* s, | |||
SpecificAttributesMap* map); | |||
|
|||
static string convertAsciiToUtf16(const string& ascii); | |||
static string convertAsciiToUtf16(const char* ascii); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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". |
@@ -102,7 +102,7 @@ namespace | |||
if (dladdr((void*) &allClean, &path)) | |||
{ | |||
name = path.dli_fname; | |||
name += ".memdebug.log"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of function call instead redefined operator does not make code better.
Rollback such changes too.
@@ -214,7 +215,7 @@ namespace Firebird | |||
T pop() | |||
{ | |||
T* pntr = inherited::pop(); | |||
T rc = *pntr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
@@ -657,7 +658,7 @@ void add_files(BurpGlobals* tdgbl, const char* file_name) | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.