From: "Wolfgang Nádasi-Donner" Date: 2007-10-27T08:31:11+09:00 Subject: Re: Hopefully Complete List of Possible Encoding Specifications -Existing Ones David Flanagan schrieb: > Actually, I'm having trouble coming up with a good argument for setting > the primary encoding from the script encoding instead of from the locale... > > The thing that convinces me that a coding comment in a script should not > set primary encoding is the question of what a coding comment should do > for files loaded with 'require'. > > (Also: does require need a new argument to specify the encoding of the > file to be loaded? Or should all library authors be sure to use a > coding comment so their files can be correctly loaded regardless of the > primary encoding of the loading script?) I think it should be possible to explicitly name the encoding of a script, even when usind "require" or "load". It can happen that a person wrote Ruby code, using some encoding, that is not my local encoding. When I will use this software the easiest way is to give explicitly the required encoding to the interpreter - via command line argument, magic coding string, or a parameter for "require" or "load" (the role of the BOM can even be used for this purpose). This can be different from "primary encoding" which will be used for interaction with Data during rubytime. Under this circumstances I, as a programmer and user of precoded scripts, have everything under control, even diffently encoded sources for one project and different encodings used in data I interact with during runtime. This would be nice and handy. Wolfgang N��dasi-Donner