[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Unicode environment variables on Windows.



Hello Todd,

Thank you for the explanation. Actually I run several parallel tasks via python API in one job and only some of them uses windows. 
But all tasks needs those unicode environment variables. I will use workaround with files for the windows tasks, for now it is the simplest solution.
Hope this will be fixed someday.

----------
Sergey Komissarov
Senior Software Developer
DATADVANCE

This message may contain confidential information
constituting a trade secret of DATADVANCE. Any distribution,
use or copying of the information contained in this
message is ineligible except under the internal
regulations of DATADVANCE and may entail liability in
accordance with the current legislation of the Russian
Federation. If you have received this message by mistake
please immediately inform me of it. Thank you!



----- Original Message -----
From: "Todd L Miller" <tlmiller@xxxxxxxxxxx>
To: "Sergey A. Komissarov via HTCondor-users" <htcondor-users@xxxxxxxxxxx>
Cc: "Sergey A. Komissarov" <sergey.komissarov@xxxxxxxxxxxxxx>
Sent: Friday, August 21, 2020 7:45:38 PM
Subject: Re: [HTCondor-users] Unicode environment variables on Windows.

> When I pass unicode value in the job environment job works fine on linux 
> but fails to decode variable value string on windows.

 	On Windows, the API to set environment variables requires that you 
specify if the variables are ANSI or Unicode.  HTCondor currently uses the 
ANSI version, which does locale-aware conversion into the UTF-16 encoding 
that Windows actually stores in the environment.  It seems like this 
conversion doesn't know what to do with UTF-8 encoded Unicode.  It may be 
possible to construct a work-around by encoding the variable values in 
UTF-16 and adjusting the locale, but that would make your submit file 
(more) Windows-specific.

 	I would recommend that you use your existing work-around, instead.

- ToddM