[OS X TeX] Strange TeXShop engine behaviour

Alan Munn amunn at gmx.com
Thu Sep 22 20:40:24 EDT 2011


On Sep 22, 2011, at 7:12 PM, Peter Dyballa wrote:

> 
> Am 23.09.2011 um 00:40 schrieb Alan Munn:
> 
>> if I add
>> 
>> export LANG=en_US.UTF-8
>> 
>> to the engine, then it works.
> 
> Yes, this will work by overriding whatever TeXShop sets for the process environment in which the ENGINE file will run.
> 
> OTOH, it's also possible that you supply TeXShop with an inadequate LANG setting. The mechanism by which a Mac OS X application is launched does not include using a shell, as it would in other Unices. Therefore the file ~/.MacOSX/environment.plist exists to correct the environment, which is set when you press RETURN in the "login window".
> 
> You can check TeXShop's behaviour by launching it from a shell this way:
> 
> 	env LANG=en_US.UTF-8 /Applications/TeX/TeXShop.app/Contents/MacOS/TeXShop &
> 
> Here TeXShop should run in an UTF-8 environment, and it should pass this setting to a process it starts. You could check with this and the original ENGINE script whether TeXShop works correctly.

I'm well aware of the .MacOSX/environment.plist, but I'm with the majority here on not wanting to use it, since it seems to cause more problems than it solves.

What would be useful, however, would be for the Sweave engine to be able to use the encoding setting of the source file (using the %TS encoding line) to pass the correct language setting when the script runs. Is there any way to do that?

Alan

-- 
Alan Munn
amunn at gmx.com







More information about the MacOSX-TeX mailing list