View Issue Details

IDProjectCategoryView StatusLast Update
0033747FPCFCLpublic2019-07-13 15:11
ReporterKlaus1Assigned ToMarco van de Voort 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformWindowsOSWin 7OS Version64 bit
Product Version3.0.4Product Build 
Target VersionFixed in Version 
Summary0033747: TProcess.Execute not work with file names on UTF8 or Unicodestring
DescriptionI me wonder because Windows 7 has both create process functions ANSI and UTF16.
I have a file with german 'Ü' at start on file name. Only when I convert the file name to the original windows codepage (WIN1252) with UTF8ToWinCP and then start process.Execute. The called program start correct on other fall I see a destroyed file name and the program not found the file on disk.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Thaddy de Koning

2018-05-17 09:39

reporter   ~0108355

Last edited: 2018-05-17 09:40

View 2 revisions

Can you give an example? because if I try {$mode delphiunicode} or {$modeswitch unicodestrings} and use Tprocess it will call the unicode version of the Windows API. I'll re-test to be sure and if correct add my test.
Plz add small example yourself too. (Plain FPC, not Lazarus)

Marco van de Voort

2018-05-17 10:19

manager   ~0108357

(Afaik TProcess is not unicode aware. Make sure you test with characters not in your ansi set to avoid coming to the wrong conclusions due to a small mistake)

It has been on my todo list for a while, but haven't come around to it.

Michl

2018-05-17 11:47

reporter   ~0108359

@Klaus1: If you work with Lazarus, maybe TProcessUTF8 (unit UTF8Process) does the job?

Marco van de Voort

2018-05-17 12:17

manager   ~0108361

Last edited: 2018-05-17 12:50

View 2 revisions

If I look in TProcessUTF8 it just does UTF8toSys in the appropriate places.
IOW it is a fix/workaround for Lazarus' utf8 hack, not an unicode TProcess.

Anyway, the test is the same as for TProcess, test with a non ansi exename and/or parameters.

Marco van de Voort

2019-05-31 22:44

manager   ~0116502

Last edited: 2019-06-04 12:02

View 2 revisions

FPC 3.3.1 TPROcess has been rewritten, please retest. Note while it is capable, it might not be by default, because neither is the windows console. If you have problems, consult the forum.

Marco van de Voort

2019-07-13 15:11

manager   ~0117247

No reaction in 6 weeks -> assume solved. Please reopen if you have additional info

Issue History

Date Modified Username Field Change
2018-05-16 19:47 Klaus1 New Issue
2018-05-17 09:39 Thaddy de Koning Note Added: 0108355
2018-05-17 09:40 Thaddy de Koning Note Edited: 0108355 View Revisions
2018-05-17 10:19 Marco van de Voort Note Added: 0108357
2018-05-17 11:47 Michl Note Added: 0108359
2018-05-17 12:17 Marco van de Voort Note Added: 0108361
2018-05-17 12:50 Marco van de Voort Note Edited: 0108361 View Revisions
2019-05-31 22:44 Marco van de Voort Assigned To => Marco van de Voort
2019-05-31 22:44 Marco van de Voort Status new => feedback
2019-05-31 22:44 Marco van de Voort FPCTarget => -
2019-05-31 22:44 Marco van de Voort Note Added: 0116502
2019-06-04 12:02 Marco van de Voort Note Edited: 0116502 View Revisions
2019-07-13 15:11 Marco van de Voort Status feedback => resolved
2019-07-13 15:11 Marco van de Voort Resolution open => no change required
2019-07-13 15:11 Marco van de Voort Note Added: 0117247