如何在APache中设置汉语?我的网页显示的是洋文,请大虾帮忙!

frank109 2004-11-09 08:44:08
我输入的是:你们好.显示的是:ÄãÃǺÃ
请大虾帮忙!apache2
我的配置文件是:

# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character 'Language' abbreviation is not identical to
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
# Norwegian (no) - Polish (pl) - Portugese (pt)
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
#
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW

#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback

#
# Specify a default charset for all pages sent out. This is
# always a good idea and opens the door for future internationalisation
# of your web site, should you ever want it. Specifying it as
# a default does little harm; as the standard dictates that a page
# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
# are merely stating the obvious. There are also some security
# reasons in browsers, related to javascript and URL parsing
# which encourage you to always set a default char set.
#
AddDefaultCharset ISO-8859-1

#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See http://www.iana.org/assignments/character-sets for the
# official list of charset names and their respective RFCs.
#
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8 .utf8

# The set below does not map to a specific (iso) standard
# but works on a fairly wide range of browsers. Note that
# capitalization actually matters (it should not, but it
# does for some browsers).
#
# See http://www.iana.org/assignments/character-sets
# for a list of sorts. But browsers support few.
#
AddCharset GB2312 .gb2312 .gb
AddCharset utf-7 .utf7
AddCharset utf-8 .utf8
AddCharset big5 .big5 .b5
AddCharset EUC-TW .euc-tw
AddCharset EUC-JP .euc-jp
AddCharset EUC-KR .euc-kr
AddCharset shift_jis .sjis

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-tar .tgz
#
# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis

#
# For server-parsed imagemap files:
#
#AddHandler imap-file map

#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
# to be distributed in multiple languages.)
#
AddHandler type-map var
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
<IfModule mod_ssl.c>
Include conf/ssl.conf
</IfModule>


...全文
254 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
frank109 2004-11-10
  • 打赏
  • 举报
回复
谢谢!我已经解决了!是:# DefaultLanguage nl前面的#号要去掉!同志们要注意!
21yanghw 2004-11-10
  • 打赏
  • 举报
回复

AddDefaultCharset GB2312
DefaultLanguage GB2312
AddLanguage zh-cn .cn
fzjw 2004-11-09
  • 打赏
  • 举报
回复
AddDefaultCharset UTF-8

这么试试呢?
frank109 2004-11-09
  • 打赏
  • 举报
回复
不过,还是不行!
frank109 2004-11-09
  • 打赏
  • 举报
回复
谢谢!
siweifeng 2004-11-09
  • 打赏
  • 举报
回复
为了让apache默认支持中文,要做些小修改,把httpd.conf文件中的"AddDefaultCharset ISO-8859-1"改为"AddDefaulCharset GB2312",重启apache后,修改生效.
串联谐振双有源桥(SR-DAB)DC-DC变换器闭环仿真研究内容概要:本文围绕串联谐振双有源桥(SR-DAB)DC-DC变换器的闭环仿真展开研究,重点探讨其在电力电子系统的动态响应特性与控制策略。通过对SR-DAB变换器建立数学模型,并结合Matlab/Simulink进行闭环仿真,分析系统在不同工作条件下的电压、电流波形及功率传输效率,验证控制算法的有效性与稳定性。研究涵盖系统建模、控制器设计(如PI控制)、软开关实现条件、抗干扰能力以及动态调节性能,旨在提升变换器在新能源、储能、数据心供电等场景的可靠性和能效水平。; 适合人群:具备电力电子、自动控制理论基础,从事新能源、微电网、电力系统仿真等相关领域的科研人员与工程技术人员。; 使用场景及目标:①用于高校及科研机构开展DC-DC变换器控制策略的教学与实验;②为工业界在高效率隔离型功率变换系统的设计与优化提供仿真依据和技术支撑;③服务于数据心、电动汽车、可再生能源并网等场景下的电源系统研发。; 阅读建议:建议读者结合Matlab代码实践仿真流程,重点关注系统建模与控制器参数整定部分,通过调整负载、输入电压等条件观察系统响应,深入理解闭环控制对变换器性能的影响机制。
内容概要:本文介绍了FastReport VCL/FMX/LCL 2026.2.4版本的更新内容,重点涵盖核心引擎、图形处理、用户界面及导出功能的优化与修复。主要更新包括修复了Developer Express兼容性问题、TfrxSVGGraphic在TImage显示问题、PDF/A导出合规性、EMF图像旋转异常,以及ReportTree拖拽功能等问题。同时,部分模块新增了HTMLTags对XLSX导出的支持、内置右键菜单和新图标,并改进了FastCube组件的元素调整体验。此外,还修复了CPP脚本Result参数名的Bug以及自定义过滤器OR操作失效的问题。; 适合人群:使用Delphi或Lazarus进行开发,且涉及报表设计与数据展示功能的高级开发者;尤其适用于需要集成FastReport控件到企业级应用的技术人员。; 使用场景及目标:①提升报表系统在不同平台(VCL/FMX/LCL)下的稳定性和兼容性;②满足PDF/A标准的文档归档需求;③优化用户交互体验,如拖拽操作与元素缩放;④增强脚本支持与数据集字段识别能力,确保开发效率与功能完整性。; 阅读建议:建议结合官方更新链接和实际项目使用的FastReport模块对照查看,重点关注自身所用组件(如VCL、FMX或Lazarus版)的具体修复项,及时升级以规避已知问题并利用新特性优化报表功能。

24,915

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧