cht電腦資訊文書排版TeX
adm Find login register

? TeXLive 2008 無法在中文 Windows 的安裝?

npchen
joined: 2008-01-14
posted: 18
promoted: 8
bookmarked: 5
1subject: ? TeXLive 2008 無法在中文 Windows 的安裝?Promote 0 Bookmark 02008-10-22quote  

我要在正體中文 Windows XP 上安裝 TeX Live 2008, 使用網路安裝法 install-tl.bat (Window 版)。最後在 DOS 視窗下看到了 mkdir 失敗的訊息,它的路徑包含了亂碼。不過,看得出來似乎是要在 all users 底下 (含「桌面」、「開始」等特殊檔案夾) 裏的某一個檔案夾裏建立新的子檔案夾。(很可能是「開始」裏面)

這似乎意味著此安裝程式無法處理中文 Windows 系統裏特定檔案夾的中文名,導致安裝失敗。不知其他網友,有沒有解決的辦法?謝謝。 

本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
2subject: Promote 0 Bookmark 02008-10-22quote  

加 -non-admin 來執行試試看。最好是使用預設的目錄,這個 installer 是用 perl 寫的,很有可能尚不支援 local encoding 的中文檔名。
 


guest
3subject: Promote 0 Bookmark 02008-10-25quote  

試過用 install-tl -non-admin, 結果一樣。附上螢幕快照。應該是此 installer script 處理中文檔案夾名有問題。

 

screen shots

npchen
joined: 2008-01-14
posted: 18
promoted: 8
bookmarked: 5
4subject: Promote 0 Bookmark 02008-10-25quote  

圖如下

本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
5subject: Promote 0 Bookmark 02008-10-25quote  

我稍微看了一下他的 code(很久沒接觸 perl 了,所以我的理解不一定正確)。他雖然有引用 Encode 模組,但完全沒有做轉碼的動作,所以,我的理解是無法支援中文檔名。

不過,有人把原安裝砍乾淨,再次重安裝又能成功,所以,我不確定問題在哪裡。使用英文的檔名、路徑名,可能是最安全的。

 


qrtt1

joined: 2007-10-02
posted: 82
promoted: 18
bookmarked: 5
藍星
6subject: Promote 0 Bookmark 02008-10-25quote  

原因是出在 post installing 階段,

它試著幫你建立捷徑在 All Users 目錄的「開始」功能表目錄之內,若您的 Windows 預設字集和我一樣是 ms950 (Big5)

那就會遇到許功蓋問題,字打出來就會變成「開始」?能表。反正就是多了 \ 把字的一半吃了 XD

其實是安裝好了,但沒有做目錄選單而已嚕。

 (這句是假設 post installing 前該裝都已經裝好的前提)

反正不管你下什麼參數,只要建立目錄時遇到許功蓋相關的字那就是穩掛。

除非有辦法讓放目錄選單的位置暫時改變,例如改成All users 下的「Starting」

或是改 Perl讓他正確地轉碼為「開始」功能表,不然大概會持續錯誤吧。

 

以上是今天試驗與觀察的感想。

 

qrtt1

joined: 2007-10-02
posted: 82
promoted: 18
bookmarked: 5
藍星
7subject: Promote 0 Bookmark 02008-10-25quote  

LGJ

我稍微看了一下他的 code(很久沒接觸 perl 了,所以我的理解不一定正確)。他雖然有引用 Encode 模組,但完全沒有做轉碼的動作,所以,我的理解是無法支援中文檔名。

不過,有人把原安裝砍乾淨,再次重安裝又能成功,所以,我不確定問題在哪裡。使用英文的檔名、路徑名,可能是最安全的。

 

 

抱歉,我想我的說法讓您誤解了。

 

mkdir 的問題是目前未解決的。

俺的另一個問題是因為 kpsewhich 找不到任何東西,因為我裝了二次不同地方,它有點錯亂,這個全砍重裝會好 :D

qrtt1

joined: 2007-10-02
posted: 82
promoted: 18
bookmarked: 5
藍星
8subject: Promote 0 Bookmark 02008-10-25quote  

http://windowsitpro.com/article/articleid/22984/how-do-i-change-the-location-of-the-shortcuts-in-the-windows-start-menu.html

這篇似乎說可以改變開始功能表的位置,不過俺一向不喜歡去動 registry。所以,就沒想要去試了 ha

本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
9subject: Promote 0 Bookmark 02008-10-25quote  

Soga。現在確定了兩件事:

  1. Windows XP 的中文檔名是用 Big-5 編碼。
  2. TeXLive installer 無法處理 Big-5 編碼的檔名,碰到許功蓋就破功了。
多謝小q 的說明 . :)


npchen
joined: 2008-01-14
posted: 18
promoted: 8
bookmarked: 5
10subject: Promote 0 Bookmark 02008-10-26quote  

謝謝各位的回應。我也有寄信問 texlive 團隊。得到如下的回音,不知各位懂 Perl 與中文 Windows 特性的前輩能否協助解決此問題?

 another Chinese reported a similar problem with TeX Live 2007 which had a completely different installer.  In order to avoid the problem
in TeX Live 2008, I sent him a program which converted an environment
variable containing a path into a list of bytes in hexadecimal
notation and asked him to send me the result back.

But the result was discouraging.  I had not been able to find out
which character encoding had been used.  The string contained a path
where one directory contained his name, a single Chinese character.
This character was represented by two bytes while the rest of the
string ("C:\Documents and Settings\...") had been single-byte ASCII
characters.

The problem is that Perl expects forward slashes as directory
separators.  Thus, if a path is entered in one of the menus or it's
taken from an environment variable, backslashes have to be converted
to forward slashes.  The only character encoding I'm aware of which
allows such a conversion without breaking multi-byte characters is
UTF-8.

About a year ago I discussed this issue with Hans Hagen.  He assumed
that, though Windows probably uses UTF-8 for file names internally,
the user interfaces are using character encodings based on national
standards.  This explains the result of our test.  He suggested to
convert file names to short names (Siep mentioned it already too).
Then a path containing East Asian characters will be converted to a
string containing ASCII characters only.  However, this is not always
possible because some programs have to determine how they had been
invoked.  In this case short names are not usable.

I'm sad that I can't provide better news.  I even don't know whether
this problem can be solved at all.  Maybe a Perl/Windows expert from
East Asia could provide more information.

At the moment, all I can recommend is to install TeX Live in a
directory which doesn't contain multi-byte (East Asian) characters in
its path.  It's definitely not a solution because on Vista you'll
certainly are not allowed to install TeX Live in a directory of your
choice.

Is there anybody who is experienced with Perl on Windows in China,
Japan, or Korea who can provide more information?
 
npchen
joined: 2008-01-14
posted: 18
promoted: 8
bookmarked: 5
11subject: Promote 0 Bookmark 02008-10-26quote  

另外個問題:

在 Windows XP 裏,是否系統內定的一些子目錄其實都有本名與翻譯名?請看

C:\Documents and Settings 這個在 中文 Windows XP 介面下看到的是「文件」(詳細翻譯名我不記得,我現在不是在用 Windows XP), Perl 也成功的取得這個本名。那麼「開始」功能表 這個翻譯名應該也會有本名吧?如果如此,perl 只要用本名,就不會有「許功蓋」的問題了?

caleb
joined: 2007-09-22
posted: 630
promoted: 134
bookmarked: 90
12subject: Promote 0 Bookmark 02008-10-26quote  

我沒有認真看,所以隨便回回。

較新的 win32 據說 kernel internal 都是用 UTF-16 little endian (win32 apps 通常顯示為 Unicode)

各大語系 win32 則多半預設用傳統 encoding,例如繁體中文就用 CP950 (Big5),簡體中文則用 CP936 (GB2312)

(不知簡體中文 win32 改用 GBK / GB16030 了沒)

filesystem 本身是無法儲存 filename encoding 的,所以無從得知檔名到底是啥。

例如用 CP950 編碼的檔名,若用 CP936 解譯就會變亂碼。

 

我想比較好的解決方式是全面使用英文目錄及檔名,把 installer 改改應該不難。

qrtt1

joined: 2007-10-02
posted: 82
promoted: 18
bookmarked: 5
藍星
13subject: Promote 0 Bookmark 02008-10-27quote  
caleb

我沒有認真看,所以隨便回回。

較新的 win32 據說 kernel internal 都是用 UTF-16 little endian (win32 apps 通常顯示為 Unicode)

各大語系 win32 則多半預設用傳統 encoding,例如繁體中文就用 CP950 (Big5),簡體中文則用 CP936 (GB2312)

(不知簡體中文 win32 改用 GBK / GB16030 了沒)

filesystem 本身是無法儲存 filename encoding 的,所以無從得知檔名到底是啥。

例如用 CP950 編碼的檔名,若用 CP936 解譯就會變亂碼。

 

我想比較好的解決方式是全面使用英文目錄及檔名,把 installer 改改應該不難。

 

問題是,那個資料夾的名稱被 windows 命名為中文的,不是使用者自己想要建立的 :D

guest
14subject: Promote 0 Bookmark 02008-10-27quote  

可是看他的貼圖,不是在使用者帳號的地方就出現亂碼了嗎?

 

npchen
joined: 2008-01-14
posted: 18
promoted: 8
bookmarked: 5
15subject: Promote 0 Bookmark 02008-10-28quote  

install-tl 這個 Perl script 是在建立

C:\Documents and Settings\All Users\「開始」功能表\程式集\

裏的 TeXLive 選項時出問題的。「開始」功能表這個檔案夾名的 Big5 編碼是

0xA1 75 B6 7D A9 6C A1 76 A5 5C AF E0 AA ED 

其中含有 "\" (0x5C), 使得 Perl script 在做 "\" ==> "/" 的轉換 (DOS style path separator vs unix style path separator) 時破功。 

這不是改用英文檔名就解決得了的。 「開始」功能表 這個系統內定的檔名應該是不能改名的吧?

另外再附的圖是在 C:\Documents and Settings\All Users

做 dir /x 的螢幕快照

可以從圖中看出平常在 Windows 裏看到的「文件」有英文本名 Documents, 但是「開始」功能表就是中文的本名。所以原先推測的英文本名的想法是不可行的。

所以,可否在 Perl script 裏取得路徑名稱,先轉成 unicode,做"\" ==> "/" 的轉換,再轉回 Big5, 然後執行 mkdir? 

本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
16subject: Promote 0 Bookmark 02008-10-28quote  

陳老師,我這邊沒有 windows 可以測試,可能要自行去測試一下,
就是使用:

 use encoding 'big5', STDIN => 'big5', STDOUT => 'big5';

請參考:  http://search.cpan.org/~rgarcia/perl/README.tw

當然,可能裡頭一些單引號的地方(如果有含中文的話)要修改成
雙引號。其他的模組好像都是要經過轉換的手續。


edited: 1
本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
17subject: Promote 0 Bookmark 02008-10-28quote  

LGJ
use encoding 'big5', STDIN => 'big5', STDOUT => 'big5';

啊,沒有考慮到裡頭的變數傳來傳去要 parse:

 use encoding 'big5', STDIN => 'big5', STDOUT => 'big5', Filter => 1;

 


npchen
joined: 2008-01-14
posted: 18
promoted: 8
bookmarked: 5
18subject: Promote 1 Bookmark 12008-11-01quote  

今天收到 TeXLive 團隊的回信,有改版的網路 installer, 其中改了 install-tl/tlpkg/TeXLive/TLWinGoo.pm 這個檔案,其日期應該是 10/29。如果本地的鏡像伺服器還沒有供新貨的話,請等幾天。

 

The latest version translates the shortcut locations to short names.
Try the net installer at
http://mirror.ctan.org/systems/texlive/tlnet/2008/

The file install-tl/tlpkg/TeXLive/TLWinGoo.pm should have a date of
october 29, otherwise your mirror is has not yet been updated for
this modification and you should wait a bit longer. I hope this
solves the problem.

 我星期一到學校後會試試。

cht電腦資訊文書排版TeX
adm Find login register
views:45688