PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: Thomas Bock on March 27, 2019, 07:43:15 AM

Title: dropping files with umlauts
Post by: Thomas Bock on March 27, 2019, 07:43:15 AM
A user received a file with an "ö" (ouml) in his mail client. He saved it in the file system and dropped it from the explorer to a multiline on a PxPlus panel. The file can not be processed in any way, because PxPlus always throws an error 12.
All components correctly show an "ö", these are the mail client, Windows explorer, and Linux bash.
Reading the directory content with a PxPlus program returns that file with $6FCC88$ for the "ö" and the file can be opened by PxPlus. But the drop event (FIN(0,"DROPFILES")) returns $6FA8$ for the "ö", which causes error 12.
What characters set is used for the drop event?
Title: Re: dropping files with umlauts
Post by: Mike King on March 27, 2019, 05:16:08 PM
I created a file with the "ö" character as the first letter and the OS returned it correctly using the native Windows ANSI character set (thus the character was return as hex F6).

If running with UTF8 enabled and you want to display the file name on the screen you will likely need to convert this ANSI character prior display as the OS is only going to provide us ANSI 8-bit strings.

NOTE: $6FA8$ is actually the lower case o followed by the umlaut accent character.
Title: Re: dropping files with umlauts
Post by: Thomas Bock on March 28, 2019, 03:16:01 AM
I simply want to open a file, which has been reported to my program by a drop event.
Running PxPlus V14 SCS on a Linux server.
Code: [Select]
read data from fin(0, "DROPFILES") to droppedFile$
open(hfn) "[wdx]"+droppedFile$
None of my conversions/substitutions for the umlaut have been successful so far.