Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder Demos and Examples » View Thread |
Messages 1 to 8 of 8 total |
PDF Client - PDF Modules Examle with german umlauts |
Mon, Dec 21 2015 5:36 AM | Permanent Link |
Michael Fry | If there is a german umlaut (ä ö ü) in the Filename, the PDF will not be displayed.
Example Input List in DLL: Auftrag 1029 Easy Work Auftrag 1033 Köhler Auftrag 1067 Läuchter Auftrag 1092 Reims Output Parameters in DLL when selected in Client EWB App : user=Demo password=Password method=load name=Auftrag 1033 K?hler So the filename "Auftrag 1033 K?hler" will not be found of course. Is this a Problem of the EWB Client or Delphi Module Application? Thanks for any hint. Michael |
Mon, Dec 21 2015 10:53 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< If there is a german umlaut (ä ö ü) in the Filename, the PDF will not be displayed. >> The issue is in the web server module. The fix is this: procedure TEWBModule1.EWBModuleExecute(Request: TEWBServerRequest); var TempPDFDirectory: String; TempFiles: TStringList; I: Integer; TempRootFileName: String; TempFileName: String; TempFileStream: TFileStream; begin if AuthenticateUser(Request) then begin // For demo, PDF files source directory is "pdfs" subdirectory under // example projects pdfmodule directory TempPDFDirectory:=IncludeTrailingBackslash(OSDocumentsDirectory)+ 'Elevate Web Builder 2\Projects\pdfmodule\pdfs'; // Tell browser not to cache response Request.ResponseHeaders.Add('Cache-Control: no-cache'); case Request.RequestMethod of rmGet: begin if AnsiSameText(Request.RequestParams.Values['method'],'list') then begin TempFiles:=TStringList.Create; try ListFiles(IncludeTrailingBackslash(TempPDFDirectory)+'*.pdf',TempFiles); // Strip out the file extension !!! for I:=0 to TempFiles.Count-1 do TempFiles[I]:=ExtractFileRoot(TempFiles[I],'.pdf'); TempFiles.Sorted:=True; Request.SendCustomContent(UTF8Encode(TempFiles.Text),'text/plain; charset=utf-8',''); <<<<<<< Here !!!!! Just add the UTF8Encode wrapper around the TempFiles.Text call and add the proper content encoding character set, and that should fix the problem. I've made the same changes here. Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 21 2015 11:46 AM | Permanent Link |
Michael Fry | Sorry Tim, but this change doesn't make a difference here.
I'm using Delphi XE7 / EWB Version 2.03b1. Michael |
Mon, Dec 21 2015 2:55 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< Sorry Tim, but this change doesn't make a difference here. I'm using Delphi XE7 / EWB Version 2.03b1. >> Yeah, the issue is in the load request using the TPlugin control. The URL being sent over is being mangled by the browser instead of being sent as UTF-8. I need to do some more looking to see if there's any way around this. Tim Young Elevate Software www.elevatesoft.com |
Mon, Dec 21 2015 3:17 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
Okay, got it now. It's a bug in the URL decoding in the EWB web server. It's decoding to UTF-8 *before* decoding the URL value, and it should be the other way around. A fix will be in 2.04 which, hopefully, will be out in a day or so. Tim Young Elevate Software www.elevatesoft.com |
Tue, Dec 22 2015 3:10 AM | Permanent Link |
Michael Fry | Thank you Tim
I'm affraid there is an other one of this Kind. When I assign Parameters with german Umlauts, the Query doesn't return anything. Otherwise it works ok. I'm using the EWB Server and an EDB Query. Example : { ---- doesn't work with umlaut ---- } { Code in Dataset RowSource : SELECT DOKUMENT_DATUM, DOKUMENT_FILENAME, RELATIVER_PFAD, RELATIVER_PFAD+DOKUMENT_FILENAME AS FULLNAME, LOWER(DOKUMENT_TYP) AS DOKUMENT_TYP, JAHR, MONAT FROM DOKUMENTE WHERE INHALT CONTAINS {SEARCH='} OR STICHWORTE CONTAINS {SEARCH=''} OR DOKUMENT_FILENAME CONTAINS {SEARCH=''} OR RELATIVER_PFAD CONTAINS {SEARCH=''} ORDER BY DOKUMENT_DATUM DESC, DOKUMENT_FILENAME } DocuBox.Close; DocuBox.Params.Clear; DocuBox.Params.Add('SEARCH='+QuotedStr('*'+LowerCase(Edit1.Text)+'*')); Database.LoadRows(DocuBox); And one more Thing, the LocalizeDateTimeColumns property doesn't seem to work. I set the Value to true in the Dataset Manager and on the TDataset component. It still shows the Date in american format no matter what I set there. I hope you don't mind me putting this in the same support thread. Michael |
Tue, Dec 22 2015 3:06 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I'm affraid there is an other one of this Kind. When I assign Parameters with german Umlauts, the Query doesn't return anything. Otherwise it works ok. >> It's the same bug - the parameters for datasets are sent as query strings in the URL. << And one more Thing, the LocalizeDateTimeColumns property doesn't seem to work. I set the Value to true in the Dataset Manager and on the TDataset component. It still shows the Date in american format no matter what I set there. >> The LocalizeDateTimeColumns has to do with how date-time values are exchanged in terms of the time zone offset, and don't have anything to do with the formatting of date-time values as strings. For that, you'll need to use the FormatSettings properties: http://www.elevatesoft.com/manual?action=viewcomp&id=ewb2&comp=TFormatSettings during application startup (main form's OnCreate event handler will work). Tim Young Elevate Software www.elevatesoft.com |
Wed, Dec 23 2015 5:11 AM | Permanent Link |
Michael Fry | Thank you for the advice and your great products.
<<< The LocalizeDateTimeColumns has to do with how date-time values are exchanged in terms of the time zone offset, and don't have anything to do with the formatting of date-time values as strings. For that, you'll need to use the FormatSettings properties: http://www.elevatesoft.com/manual?action=viewcomp&id=ewb2&comp=TFormatSettings >>> I wish you pleasant holydays. Michael |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |