File names was Re: Warning: Large Babel translation

John M McIntosh johnmci at smalltalkconsulting.com
Sat Nov 15 01:53:49 UTC 2003


On Nov 14, 2003, at 5:32 PM, Yoshiki Ohshima wrote:

>   Hello,
>
>> Right now the primitives that supply or take file names/paths expect  
>> to
>> see MacRoman characters
>> which then map mostly to the apple fonts for display, or better to the
>> AccuFonts which actually gets things right.
>> However this isn't helpful for folks which can insert unicode
>> characters into file names.
>>
>> Now what I'm proposing is to change the mac os-x vm  return and deal
>> with UTF-8 strings.  That way
>> picking a unicode based file will later allow the opening of the file.
>>
>> I welcome comment.
>
>   I don't fully understand what you meant by 'file name' and  
> 'displaying'
> relationship,

Right now for example french canadian users when they name files using  
certain
accented characters will see them correctly in the squeak file browser.  
  When
we migrate to UTF8 strings then certain accented characters will become  
multiple-byte sequences
which won't render as expected.  Also I'm not quite sure how they would  
type them
in because you are using a macroman character set to construct them,  
but on say
a file open, I don't really have sufficient information to decide if  
the incoming array of bytes
is a String or UTF8. We could hunt that information down by looking at  
the class, however
what to do about older images & newer VMs etc is a question for  
discussion. Maybe a
different api for UTF8 file names? And perhaps a UTF8String class to  
render text based on current font?

>
>   I assume that 'VM returns and deals with UTF-8 string' means that
> the VM doesn't do any translation on file names; e.g. a byte sequence
> that represents a file name in the file system doesn't get translated
> any of dir_lookup() or upper, and passed to the image, right?

Right for OS-X the native file/directory strings are UTF-8 Right now we  
carefully map back and forth between MacRoman


>
>   That's probably ok if we don't have to worry about the compatibility
> with old/current images.  I like the idea that the VM doesn't do any
> translation and the image deals with the conversion between the OS and
> the (upper level of) Squeak image expect.
>
>   Hayashi-san made a patch along with this line, so he must have got
> some thing to say how it should be implemented.
>
> -- Yoshiki
>
>
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list