Try to fix broken characters in SHOW CREATE TABLE result by using UTF8StringToWideString(). Fixes issue #1328.

This commit is contained in:
Ansgar Becker
2009-10-28 01:16:29 +00:00
parent aa6e1702fb
commit 8354c106ca
5 changed files with 14 additions and 8 deletions

View File

@ -334,7 +334,6 @@ begin
editName.Text := FAlterTableName;
Mainform.SetEditorTabCaption(Self, FAlterTableName);
Results := Mainform.Connection.GetResults('SHOW TABLE STATUS LIKE '+esc(FAlterTableName));
memoComment.Text := Results.Col(DBO_COMMENT);
if Results.ColExists(DBO_ENGINE) then
engine := Results.Col(DBO_ENGINE)
else
@ -355,6 +354,11 @@ begin
memoUnionTables.Text := rx.Match[1]
else
memoUnionTables.Clear;
rx.Expression := '\bCOMMENT=''((.+)[^''])''';
if rx.Exec(CreateTable) then
memoComment.Text := WideStringReplace(rx.Match[1], '''''', '''', [rfReplaceAll])
else
memoComment.Clear;
rx.ModifierS := False;
rx.ModifierM := True;