Unix VM path encodings
andreas.raab at gmx.de
Sun Dec 30 09:28:02 UTC 2007
Oh, interesting. That reminds me of the fix that I needed for Windows,
let me see... yes, here it is: LanguageEnvironment
class>>defaultFileNameConverter needs to be fixed since it is (wrongly)
guessing the file name encoding based on the currently active locale
(which makes no sense btw, since the locale doesn't mean Jack for file
name encodings). Hm ... lemme try this ... ah, interesting. It appears
that I can make the Umlauts work on Unix correctly if and only if:
* I fix the above method to return UTF8TextConverter in every case [*1]
* I use -pathenc MacRoman -textenc MacRoman
Which makes no sense to me since neither the path nor the text encoding
is MacRoman but it appears to work. Huh?
[*1] And that of course reminds me that nobody has really made any
comment on why the hell we still deal with all of these nonsensical
legacy encodings and don't just go straight to UTF-8 in the VM interface
which would simplify *lots* of cruft in the code.
John M McIntosh wrote:
> On Dec 29, 2007, at 11:32 PM, Andreas Raab wrote:
>> Hi -
>> Due to a bug reported against Qwaq Forums I needed to look into how
>> the Unix VM encodes file and path names and got terribly confused.
> Also see
> From: bert at impara.de
> Subject: Re: mac carbon VM goes to unix file names, testers needed
> Date: February 6, 2006 12:54:17 AM PST (CA)
>> We've been using UTF-8 VM encoding for a while, to be able to access
>> files with non-ASCII characters in their path. However, I haven't
>> found a way to permanently switch the image (3.8) to UTF-8 encoding.
>> It keeps resetting to Latin1 on startup. The only solution for me was
>> to put this line in my own startup code:
>> LanguageEnvironment classPool at: #FileNameConverterClass put:
>> Did anybody create a better solution than this horrible hack? I feel
>> someone else must be using UTF-8, too, now that we support it ...
>> - Bert -
> John M. McIntosh <johnmci at smalltalkconsulting.com>
> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
More information about the Squeak-dev