From 173aca500976ab8f66f20bf95b3966089ddf4a5e Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 24 Jun 2008 20:22:00 +0000 Subject: [PATCH] Make sstr() unicode compliant to fix bug #313 "Run SQL file dialog fails for German umlauts in file" --- source/helpers.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/helpers.pas b/source/helpers.pas index e9b5cd08..8636d2f4 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -39,7 +39,7 @@ type function IsValidDelimiter(var s: WideString): WideString; type TParseSQLProcessCommand = procedure(command: WideString; parameter: WideString) of object; function parsesql(sql: WideString; delimiter: WideString; processcommand: TParseSQLProcessCommand = nil) : TWideStringList; - function sstr(str: String; len: Integer) : String; + function sstr(str: WideString; len: Integer) : WideString; function encrypt(str: String): String; function decrypt(str: String): String; function htmlentities(str: String): String; @@ -666,7 +666,7 @@ end; @param integer Wished Length of string @return string } -function sstr(str: String; len: Integer) : String; +function sstr(str: WideString; len: Integer) : WideString; begin if length(str) >= len then begin