View Issue Details

IDProjectCategoryView StatusLast Update
0034158FPCRTLpublic2018-08-20 13:55
ReporterKlaus1 Assigned ToMarco van de Voort  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSWindows 64-bit 
Product Version3.0.4 
Fixed in Version3.2.0 
Summary0034158: function ExecuteProcess not working with Unicodestring
DescriptionI have seen that the function only work with Ansistring and when I have umlaut Ü,Ö,Ä in file name the function not work correct.
I have the function adapted and I think is ok.
I think is good in SysUtils and is possible Ansistring and Unicodestring.
   
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Klaus1

2018-08-20 11:33

reporter  

ExecuteProcess.pas (1,781 bytes)

Klaus1

2018-08-20 11:51

reporter   ~0110166

supplement: the cause is in case of UTF8string with umlaut Ö,Ü,Ä en filename. Lazarus work with UTF8 strings and the declaration for string = UTF8string but a UTF8 string is not a normal Ansistring with 1 byte coding. the function not convert to windows codepage and so the calling of CreateProcessA not work.
On windows is always good use the "W" functions for direct windows routines.

I think a good idea is all the functions calling windows routines with "A" deaktivate and only use the "W" functions. I think that is good for a new version from freepascal.
Regards Klaus

Marco van de Voort

2018-08-20 13:19

manager   ~0110169

Last edited: 2018-08-20 13:20

View 2 revisions

- To use unicode, make sure you craft a unicodestring and pass that to executeprocess. The Ansistring version has no unicode support.
 - no demonstration source of the problem.

Marco van de Voort

2018-08-20 13:55

manager   ~0110170

Fixed in trunk. Forget the above comment, I checked trunk, and everything was ok, but this was not merged back to 3.0.4

Next major version will fix this, and also have a unicode TProcess.

Issue History

Date Modified Username Field Change
2018-08-20 11:33 Klaus1 New Issue
2018-08-20 11:33 Klaus1 File Added: ExecuteProcess.pas
2018-08-20 11:51 Klaus1 Note Added: 0110166
2018-08-20 13:19 Marco van de Voort Note Added: 0110169
2018-08-20 13:19 Marco van de Voort Assigned To => Marco van de Voort
2018-08-20 13:19 Marco van de Voort Status new => feedback
2018-08-20 13:20 Marco van de Voort Note Edited: 0110169 View Revisions
2018-08-20 13:55 Marco van de Voort Note Added: 0110170
2018-08-20 13:55 Marco van de Voort Status feedback => resolved
2018-08-20 13:55 Marco van de Voort Fixed in Version => 3.2.0
2018-08-20 13:55 Marco van de Voort Resolution open => fixed