[texworks] TeXworks through TeX Live on Windows with multi-byte username

Stefan Löffler st.loeffler at gmail.com
Tue Jan 6 19:35:43 CET 2015


Hi Yusuke,

On 06.01.2015 15:17, KUROKI Yusuke wrote:
> Thank you for understanding the problem, but in my environment,
> it is not good enough.  I will describe some test cases below.
> The OS of mine is Japanese version of Windows 7 SP1, 64bit.

I'm sorry, I don't get the remaining issue (see below).

> Basically, if TW_INIPATH does not exist, %USERPROFILE%\TeXworks is used,
> otherwise (i.e., if TW_INIPATH exists), TW_INIPATH is used.

For the standalone version of TeXworks (i.e., when it's not shipped with
TeXLive), that is the intended behavior (except for what I think is a typo):
If TW_INIPATH and/or TW_LIBPATH are invalid (e.g., not set, or set to a
path that does not exist/is not recognized), Tw uses the registry for
the configuration ("ini") and %USERPROFILE%\TeXworks for the resources
("lib").
If TW_INIPATH is set to a valid path, that path is used for the
configuration ("ini")
If TW_LIBPATH is set to a valid path, that path is used for the
resources ("lib")

This is exactly how it should be. After all, you can use Tw not only
with TeXLive, but also with MiKTeX, or any other TeX distro, or possibly
with several TeX distros at the same time, etc.. Hence, Tw stores its
files/configuration in a "default" location unless it's told to use a
different location. That's where TeXLive (and other distros) can kick
in: they can either modify Tw itself to use a different default
location, or ensure that TW_INIPATH and TW_LIBPATH are set properly.
AFAIK, TL uses the second approach: they provide a wrapper
(bin\win32\texworks.exe, which is only 177 KB in my case) which,
presumably, simply sets the environment variables and then runs
tlpkg\texworks\texworks.exe (21 MB - this is the "real" program).

> Case 1) TW_LIBPATH = TW_INIPATH = C:\temp\Löffler\texworks
> The above basic description occurs.
> If I use TL2014 binary (direct access to bin\win32\texworks.exe),
> it creates C:\temp\Loffler\texworks, but it could not read the
> directory as you guess.

I think the directory is created in the wrapper. Tw itself (the old
version) only gets a path it does not understand so it falls back to the
default behavior.

> The another point is, not ö but simple o. (I think this is OS'es
> restriction in encoding or something)

Yes, I think so, too. All these paths seem to use the local encoding (in
your case: Japanese, in my case: German).

> In this situation, when I execute the updated binary,
> the binary successfully access C:\temp\Loffler\texworks .

So the new version works, right?

> Case 2) TW_LIBPATH = TW_INIPATH = C:\temp\ああああ\texworks
> The above basic description occurs.
> If I use TL2014 binary (direct access to bin\win32\texworks.exe),
> it creates C:\temp\ああああ\texworks, but it could not read the directory
> as you guess.

Same as above. The directory is probably created by the wrapper, Tw
(old) does not understand the path and falls back to the default.

> In this situation, when I execute the updated binary,
> the binary successfully access C:\temp\ああああ\texworks .

So the new version works, right?

Best,
Stefan


More information about the texworks mailing list