XLSReadWriteII5. TXLSTokenizer.DoName bug in russian charset
Posted: Wed Feb 15, 2017 3:25 pm
hi. I use XLSReadWriteII5 and russian charset.
The problem is in this construction:
while (Result <= FLen) and AnsiChar(FValue[Result]) in [AnsiChar(FormatSettings.ListSeparator),AnsiChar('\')......]) do
Converting multibyte char to AnsiChar work incorrect, but multibyte string to ansi string works just fine.
So it willbe good to rewrite this code:
while (Result <= FLen) and not (AnsiString(FValue)[Result] in [AnsiChar(FormatSettings.ListSeparator),AnsiChar('\') ...] do
And even more correctly:
while (Result <= FLen) and not (CharInSet(FValue[Result] in [FormatSettings.ListSeparator, '\'...] do
function TXLSTokenizer.DoQuotedName and many others has the same error.
Hope this will be fixed in next revisions.
Regards
Anton
The problem is in this construction:
while (Result <= FLen) and AnsiChar(FValue[Result]) in [AnsiChar(FormatSettings.ListSeparator),AnsiChar('\')......]) do
Converting multibyte char to AnsiChar work incorrect, but multibyte string to ansi string works just fine.
So it willbe good to rewrite this code:
while (Result <= FLen) and not (AnsiString(FValue)[Result] in [AnsiChar(FormatSettings.ListSeparator),AnsiChar('\') ...] do
And even more correctly:
while (Result <= FLen) and not (CharInSet(FValue[Result] in [FormatSettings.ListSeparator, '\'...] do
function TXLSTokenizer.DoQuotedName and many others has the same error.
Hope this will be fixed in next revisions.
Regards
Anton