mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
Fix copying 3 byte characters into HTML.
При копировании запроса в HTML содержащего 3-х байтовые символы UNICODE сбивалась раскраска.
This commit is contained in:
parent
63d0c37478
commit
64d093e4bd
1 changed files with 7 additions and 9 deletions
|
|
@ -1843,23 +1843,21 @@ wxString ctlSQLBox::TextToHtml(int start, int end,bool isAddNewLine, const std::
|
|||
prevColor = tColor;
|
||||
}
|
||||
//str.append(str[k].GetValue());
|
||||
l = 1;
|
||||
wxUniChar c = selText[k];
|
||||
|
||||
if (!c.IsAscii()) l++;
|
||||
startp=PositionRelative(startp,1);
|
||||
int s = 0;
|
||||
//wxUniChar c = selText[k].GetValue();
|
||||
if (c == '\r') { startp = startp + l; k++; continue; };
|
||||
if (c == '\r') { k++; continue; };
|
||||
|
||||
if (c == '\n') { lstr += newline; startp = startp + l; k++; continue; };
|
||||
if (c == '\n') { lstr += newline; k++; continue; };
|
||||
if (c == 9) s = 5;
|
||||
if (c == 32) s = 1;
|
||||
if (c == '<') { lstr+="<"; startp = startp + l; k++; continue; };
|
||||
if (c == '>') { lstr+=">"; startp = startp + l; k++; continue; };
|
||||
if (c == '&') { lstr+="&"; startp = startp + l; k++; continue; };
|
||||
if (c == '<') { lstr+="<"; k++; continue; };
|
||||
if (c == '>') { lstr+=">"; k++; continue; };
|
||||
if (c == '&') { lstr+="&"; k++; continue; };
|
||||
if (s > 0) for (int tt = 0; tt < s; tt++) lstr += " ";
|
||||
else lstr += c;
|
||||
startp = startp + l; k++;
|
||||
k++;
|
||||
if ((k-1)>=pos) {
|
||||
lenobj--;
|
||||
if (lenobj==0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue