PxPlus User Forum

Twitter Twitter Twitter

Author Topic: dropping files with umlauts  (Read 1226 times)

Thomas Bock

  • Diamond Member
  • *****
  • Posts: 177
    • View Profile
dropping files with umlauts
« 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?

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: dropping files with umlauts
« Reply #1 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.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Thomas Bock

  • Diamond Member
  • *****
  • Posts: 177
    • View Profile
Re: dropping files with umlauts
« Reply #2 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.