Re: [Pharo-users] pharo location include korean charactor then look is not good.

2018-05-25 Thread Sven Van Caekenberghe
I made the following quick changes:

UnixEnvironment>>#environAt: index
^ (self environ at: index) ifNotNil: [ :string | string asByteArray 
utf8Decoded ] 

OSPlatform>>#currentWorkingDirectoryPathWithBuffer: aByteString


^ (self getPwdViaFFI: aByteString size: aByteString size) 
ifNotNil: [ :string | string asByteArray utf8Decoded ]
ifNil:[ self error:'Insufficient buffer size to read current 
working directory: ' , aByteString size asString]

But actually almost any string coming from the VM seems wrong (i.e. should be 
further UTF-8 decoded):

SmalltalkImage>>#[prim]ImagePath

and #vmFileName basically probably every call 
VirtualMachine>>#getSystemAttribute:

what a mess ...

> On 25 May 2018, at 10:49, Sven Van Caekenberghe  wrote:
> 
> We looked at this before, but came to no conclusion.
> 
> The problem lies with OS environment variable decoding.
> 
> I created a 64-bit Pharo 7 in /tmp/été on macOS.
> 
> FileLocator imageDirectory resolve.
> "File @ /private/tmp/été"
> 
> Smalltalk os environment at: 'PWD'.
> "'/tmp/été'"
> 
> (Smalltalk os environment at: 'PWD') asByteArray utf8Decoded.
> "'/tmp/été'"
> 
> Smalltalk os environment asDictionary. 
> 
> FileBrowser works OK too but starts up with a wrong window title.
> 
> I believe the real issue is that we are not 100% sure that it is always UTF8 
> on all platforms all the time (i.e. apparently users can put their (Windows) 
> OS in a different encoding).
> 
>> On 25 May 2018, at 10:28, Hilaire  wrote:
>> 
>> I second you on this issue. Something went wrong in the encoding in the path 
>> in your window title. Ã smells like UTF-8 issue.
>> 
>> Looks like Pharo7 still has some issue(s) when handling UTF-8 characters 
>> used in modern Operating System filling system.
>> 
>> Another example of this problem, with DrGeo copied in a path with UTF-8 
>> characters, for example Été folder. When DrGeo is started, Pharo creates a 
>> folder Été where it creates some locale/ folder
>> 
>> I see this problem on ubtuntu 17.10 and Mac OSX at my school.
>> 
>> We have this problem for years, I was believing it was fixed, but apparently 
>> not.
>> 
>> Hilaire
>> 
>> 
>> Le 25/05/2018 à 04:09, peter yoo a écrit :
>>> so.. application location include korean charactor then broken title string 
>>> in pharo window.
>>> (of course ubuntu 18.04 with gnome env)
>>> 
>>> broken title is "바탕화면". it's ok? or where to report?
>>> 
>>> look a attached file please.
>>> 
>>> -- 
>> 
>> -- 
>> Dr. Geo
>> http://drgeo.eu
>> 
>> 
> 




Re: [Pharo-users] pharo location include korean charactor then look is not good.

2018-05-25 Thread Guillermo Polito
On Fri, May 25, 2018 at 10:49 AM, Sven Van Caekenberghe 
wrote:

> We looked at this before, but came to no conclusion.
>
> The problem lies with OS environment variable decoding.
>

I don't think that the window title comes from an OS env var.
This should be some encoding missing in the primitive (or the caller of the
primitive) that sets the window title or even a VM issue.


>
> I created a 64-bit Pharo 7 in /tmp/été on macOS.
>
> FileLocator imageDirectory resolve.
>  "File @ /private/tmp/été"
>
> Smalltalk os environment at: 'PWD'.
>  "'/tmp/été'"
>
> (Smalltalk os environment at: 'PWD') asByteArray utf8Decoded.
>  "'/tmp/été'"
>
> Smalltalk os environment asDictionary.
>
> FileBrowser works OK too but starts up with a wrong window title.
>
> I believe the real issue is that we are not 100% sure that it is always
> UTF8 on all platforms all the time (i.e. apparently users can put their
> (Windows) OS in a different encoding).
>

Well, not even. Because environment variables can have arbitrary data, in
whatever encoding.
IMHO, It's up to the user, the one that reads/write into PWD to
encode/decode it correctly.

We are in a sprint right now, I'm working with Asbath on some simple issues
so he learns the process.
I'll take a look at this in some minutes.


>
> > On 25 May 2018, at 10:28, Hilaire  wrote:
> >
> > I second you on this issue. Something went wrong in the encoding in the
> path in your window title. Ã smells like UTF-8 issue.
> >
> > Looks like Pharo7 still has some issue(s) when handling UTF-8 characters
> used in modern Operating System filling system.
> >
> > Another example of this problem, with DrGeo copied in a path with UTF-8
> characters, for example Été folder. When DrGeo is started, Pharo creates a
> folder Été where it creates some locale/ folder
> >
> > I see this problem on ubtuntu 17.10 and Mac OSX at my school.
> >
> > We have this problem for years, I was believing it was fixed, but
> apparently not.
> >
> > Hilaire
> >
> >
> > Le 25/05/2018 à 04:09, peter yoo a écrit :
> >> so.. application location include korean charactor then broken title
> string in pharo window.
> >> (of course ubuntu 18.04 with gnome env)
> >>
> >> broken title is "바탕화면". it's ok? or where to report?
> >>
> >> look a attached file please.
> >>
> >> --
> >
> > --
> > Dr. Geo
> > http://drgeo.eu
> >
> > 
>
>
>


-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
*


*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


Re: [Pharo-users] pharo location include korean charactor then look is not good.

2018-05-25 Thread Sven Van Caekenberghe
We looked at this before, but came to no conclusion.

The problem lies with OS environment variable decoding.

I created a 64-bit Pharo 7 in /tmp/été on macOS.

FileLocator imageDirectory resolve.
 "File @ /private/tmp/été"

Smalltalk os environment at: 'PWD'.
 "'/tmp/été'"

(Smalltalk os environment at: 'PWD') asByteArray utf8Decoded.
 "'/tmp/été'"

Smalltalk os environment asDictionary. 

FileBrowser works OK too but starts up with a wrong window title.

I believe the real issue is that we are not 100% sure that it is always UTF8 on 
all platforms all the time (i.e. apparently users can put their (Windows) OS in 
a different encoding).

> On 25 May 2018, at 10:28, Hilaire  wrote:
> 
> I second you on this issue. Something went wrong in the encoding in the path 
> in your window title. Ã smells like UTF-8 issue.
> 
> Looks like Pharo7 still has some issue(s) when handling UTF-8 characters used 
> in modern Operating System filling system.
> 
> Another example of this problem, with DrGeo copied in a path with UTF-8 
> characters, for example Été folder. When DrGeo is started, Pharo creates a 
> folder Été where it creates some locale/ folder
> 
> I see this problem on ubtuntu 17.10 and Mac OSX at my school.
> 
> We have this problem for years, I was believing it was fixed, but apparently 
> not.
> 
> Hilaire
> 
> 
> Le 25/05/2018 à 04:09, peter yoo a écrit :
>> so.. application location include korean charactor then broken title string 
>> in pharo window.
>> (of course ubuntu 18.04 with gnome env)
>> 
>> broken title is "바탕화면". it's ok? or where to report?
>> 
>> look a attached file please.
>> 
>> -- 
> 
> -- 
> Dr. Geo
> http://drgeo.eu
> 
> 




Re: [Pharo-users] pharo location include korean charactor then look is not good.

2018-05-25 Thread Hilaire
I second you on this issue. Something went wrong in the encoding in the 
path in your window title. Ã smells like UTF-8 issue.


Looks like Pharo7 still has some issue(s) when handling UTF-8 characters 
used in modern Operating System filling system.


Another example of this problem, with DrGeo copied in a path with UTF-8 
characters, for example Été folder. When DrGeo is started, Pharo creates 
a folder Été where it creates some locale/ folder


I see this problem on ubtuntu 17.10 and Mac OSX at my school.

We have this problem for years, I was believing it was fixed, but 
apparently not.


Hilaire


Le 25/05/2018 à 04:09, peter yoo a écrit :
so.. application location include korean charactor then broken title 
string in pharo window.

(of course ubuntu 18.04 with gnome env)

broken title is "바탕화면". it's ok? or where to report?

look a attached file please.

--


--
Dr. Geo
http://drgeo.eu



Re: [Pharo-users] pharo location include korean charactor then look is not good.

2018-05-24 Thread Guillermo Polito
That's probably that the font used to render window titles is different
than the one used for text...

Check here:

http://pharo.org/contribute

All the information for issue reporting should be there :)
Tx!

On Fri, May 25, 2018 at 4:09 AM, peter yoo  wrote:

> so.. application location include korean charactor then broken title
> string in pharo window.
> (of course ubuntu 18.04 with gnome env)
>
> broken title is "바탕화면". it's ok? or where to report?
>
> look a attached file please.
>
> --
> http://lookandwalk.com  http://looknw.com | http://onionmixer.net
> peter yoo(Jonghwa Yoo). ROK
>



-- 



Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - *http://www.cnrs.fr
*


*Web:* *http://guillep.github.io* 

*Phone: *+33 06 52 70 66 13


[Pharo-users] pharo location include korean charactor then look is not good.

2018-05-24 Thread peter yoo
so.. application location include korean charactor then broken title string
in pharo window.
(of course ubuntu 18.04 with gnome env)

broken title is "바탕화면". it's ok? or where to report?

look a attached file please.

-- 
http://lookandwalk.com  http://looknw.com | http://onionmixer.net
peter yoo(Jonghwa Yoo). ROK