Re: bsd內建ftp的小問題!?
※ 引述《signature.bbs@bbs.tku.edu.tw (Bossini)》之銘言:
> 無法正確建立如有包含"程"式....等的一些中文字
> 均會出現亂碼
> 後面接著的字當然也都不見了
> 有啥方式可解決阿
> 每個版本的BSD都有同樣問題出現哩~~~
作者 Wang.bbs@bbs.ba.mgt.ncu.edu.tw ( ), 看板 BSD
標題 Re: 4.7 Release 內建 ftpd 的中文問題
時間 中大企管初心庭園 (Tue Apr 1 12:12:48 2003)
※ 引用【daemon.bbs@kulu.twbbs.org (daemon)】的話:
: 例如「程」、「逢」第二個 character 是 '{' 的中文字
: 就下載不下來?
: 這是 ftpd 的問題嗎?
: 因為我在 SunOS 上試沒問題... 有 '{' 的中文字的檔案還是能下載
因為 FreeBSD 內容的 FTPD 會將 { 和 \ 的字去除
如果你想要讓這些中文字可可以正常使用
請修改 /usr/src/libexec/ftpd/ftpcmd.y
找到下列這一行:
GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
將它改成:
GLOB_NOCHECK|GLOB_TILDE|GLOB_NOESCAPE;
再重新 compile ftpd
man 3 glob
.....
GLOB_NOESCAPE By default, a backslash (`\') character is used to
escape the following character in the pattern, avoiding
any special interpretation of the character. If
GLOB_NOESCAPE is set, backslash escaping is disabled.
GLOB_BRACE Pre-process the pattern string to expand `{pat,pat,...}'
strings like csh(1). The pattern `{}' is left unex괊 panded for historical reasons (and csh(1) does the same
thing to ease typing of find(1) patterns).
--
_____________
| ,,, ,* |
| ( '-')/) |「紊亂中找到秩序,混沌中釐清觀念」
| (( ) | 不管周遭的世界如何改變,世上仍然有恆常不變的根本價值與通則
| (,,),) |
|_____________| - Jim Collins -
--
※ Origin: SayYA 資訊站 <bbs.sayya.org>
◆ From: 61-231-150-98.dynamic.hinet.net
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
FreeBSD 近期熱門文章
PTT數位生活區 即時熱門文章