Manuscript (Case [Issue]22658) Command Line - Better manage encoding of environment variables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Manuscript (Case [Issue]22658) Command Line - Better manage encoding of environment variables

Pharo Issue Tracker
Manuscript Notification
avatar
Guillermo Polito revised a previous entry on Case 22658: Better manage encoding of environment variables:
Bug in Project:  Command Line: 1. Pharo Image  •  You are subscribed to this case
We should somehow backport some of the enhancements done in the Pharo launcher regarding encoding of environment variables. We have already studied possible alternatives with Pablo and Christophe and arrived to the conclusion:

 

API Proposal for OSEnvironment:


at getEnv : aVariableName
Gets the value of an environment variable called `aVariableName`
It is the system reponsibility to manage the encoding.
Rationale: A common denominator for all platforms providing an already decoded string, because windows does not (compared to *nix systems) provide a encoded byte representation of the value. Windows has instead its own wide string representation.

[optionally]
rawAt  getEnvRaw : anEncodedVariableName
Gets the value of an environment variable called `anEncodedVariableName` already encoded.
It is the user responsibility to encode and decode argument and return values in the encoding of this preference.
Rationale: Some systems may want to have the liberty to use different encodings, or even to put binary data in the variables.

[optionally]
at getEnv : aVariableName encoding: anEncoding
Gets the value of an environment variable called `aVariableName` using `anEncoding` to encode/decode arguments and return values.
Rationale: *xes could use different encodings


Other Implementation details


VM primitives returning paths Strings should be carefuly managed to decode them (since they are actually disguised byte arrays).

Windows requires calling the right *Wide version of the functions from C, plus the correct encoding routine. This could be implemented as an FFI call or by modifying the VM to do it properly instead of calling the Ascii version
Priority Priority: 4 – Would be nice Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Later

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want Manuscript notifications anymore? Update your preferences.

Manuscript

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker