Question
Robert Hildebrand · May 14, 2021

Problem with german Umlaute (ä,ü,ö) in $ZF(-100)

Hello,

I created a custom business operation to copy PDF files in Intersystems Healthshare. To copy the files I used:

$ZF(-100, "", "cp", "-f", tSource, tTarget)

tSource contains the source file e.g. "/opt/var/data/dir/1821008687135422926_5849146876.pdf".

tTargetSource contains the target file "/opt/targetdir/Müller_Jörg_1821008687.pdf".

Copying files without german Umlaute works fine (e.g Smith_Robert_1821081542.pdf), but when the string contains special characters like "ä", "ö", "ü" or even  "ß" copying is not successful.

Do I have to replace the special characters or is there a possibility to change the encoding of the $ZF() function?

Best regards

Robert

Product version: HealthShare 2017.2
$ZV: Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.2 (Build 865_0_18359U) Wed Jul 25 2018 16:08:01 EDT
00
1 0 3 121
Log in or sign up to continue

what will show the output of locale command in OS?

So, your filesystem may not accept Unicode. And you would need to convert Unicode to a more suitable codepage.

Converting the file name to UTF8 usually helps. E.g.

USER>s file=$zcvt("/home/qms/Müller_Jörg.txt","o","UTF8") w $zf(-100,"","touch",file)
0
qms@testhost:~$ ls -l Müller_Jörg.txt
-rw-rw-r-- 1 qms cacheusr 0 May 15 18:39 Müller_Jörg.txt