看板FreeBSD
标 题Re: bsd内建ftp的小问题!?
发信站SayYA 资讯站 (Tue May 18 18:55:26 2004)
转信站ptt!ctu-reader!news.nctu!SayYa
※ 引述《[email protected] (Bossini)》之铭言:
> 无法正确建立如有包含"程"式....等的一些中文字
> 均会出现乱码
> 後面接着的字当然也都不见了
> 有啥方式可解决阿
> 每个版本的BSD都有同样问题出现哩~~~
作者
[email protected] ( ), 看板 BSD
标题 Re: 4.7 Release 内建 ftpd 的中文问题
时间 中大企管初心庭园 (Tue Apr 1 12:12:48 2003)
※ 引用【[email protected] (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