<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 12:35 PM, Sven Van Caekenberghe <span dir="ltr"><<a href="mailto:sven@stfx.eu" target="_blank">sven@stfx.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Eliot,<br>
<span class=""><br>
> On 20 Jan 2015, at 20:38, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Tue, Jan 20, 2015 at 8:00 AM, Sven Van Caekenberghe <<a href="mailto:sven@stfx.eu">sven@stfx.eu</a>> wrote:<br>
> Command line arguments enter the image level via VirtualMachine>>#getSystemAttribute:<br>
><br>
> At that point they are already Strings.<br>
><br>
> ByteString, according to the primitive. So if the shell supplies e.g. UTF-8 strings for command-line parameters, which the VM sees as bytes, then the ByteString instances answered by getSystemAttribute: would need decoding, right?<br>
><br>
> In your case, they must already be wrong at that point.<br>
><br>
> Not necessarily. The getSystemAttribute: primitive doesn't do decoding. Perhaps it should.<br>
<br>
</span>Yes, probably. I just tried on Mac OS X, Pharo 4:<br>
<br>
$ export FOO=élève-Français<br>
<br>
$ echo $FOO<br>
élève-Français<br>
<br>
$ ./pharo Pharo.image eval 'OSPlatform current environment at: #FOO'<br>
'élève-Français'<br>
<br>
$ ./pharo Pharo.image eval '(OSPlatform current environment at: #FOO) asByteArray utf8Decoded'<br>
'élève-Français'<br>
<br>
The question is, is this true for all platforms ? Windows ?<br></blockquote><div><br></div><div>I'm trying to test this in Pharo 3. I get</div><div><br></div><div>KeyNotFound: key #FOO not found in PlatformIndependentEnvironment</div><div>PlatformIndependentEnvironment(OSEnvironment)>>at: in Block: [ KeyNotFound signalFor: aKey ]</div><div>UndefinedObject>>ifNil:</div><div>PlatformIndependentEnvironment(OSEnvironment)>>at:ifAbsent:</div><div>PlatformIndependentEnvironment(OSEnvironment)>>at:</div><div>UndefinedObject>>DoIt</div><div>OpalCompiler>>evaluate</div><div>OpalCompiler(AbstractCompiler)>>evaluate:</div><div>SmalltalkImage>>evaluate:</div><div>EvaluateCommandLineHandler>>evaluate: in Block: [ ...</div><div>BlockClosure>>on:do: </div><div><br></div><div><br></div><div>Does the environment access depend on NativeBoost?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><br>
> > On 20 Jan 2015, at 16:51, Hilaire <<a href="mailto:hilaire@drgeo.eu">hilaire@drgeo.eu</a>> wrote:<br>
> ><br>
> > Le 20/01/2015 16:34, Sven Van Caekenberghe a écrit :<br>
> >> No they are not - Strings and Characters in Pharo are using plain Unicode encoding internally.<br>
> ><br>
> > Thanks for the update, and the reference link.<br>
> ><br>
> > Hilaire<br>
> ><br>
> > --<br>
> > Dr. Geo - <a href="http://drgeo.eu" target="_blank">http://drgeo.eu</a><br>
> > iStoa - <a href="http://istoa.drgeo.eu" target="_blank">http://istoa.drgeo.eu</a><br>
> ><br>
> ><br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> best,<br>
> Eliot<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>