简体   繁体   English

XAMPP Apache Server中的字符集

[英]Charset in XAMPP Apache Server

I got some issues with my Apache server from XAMPP for running PHP, I included the following in my PHP files to set their charset to the following: 我从XAMPP的Apache服务器运行PHP时遇到了一些问题,我在PHP文件中包含了以下内容,以将其字符集设置为以下内容:

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">

I want to display the german special characters ä, ö, ü and ß. 我要显示德语特殊字符ä,ö,ü和ß。 But all I get displayed are some strange letters. 但是我得到的只是一些奇怪的字母。

Does anyone know how to solve this? 有谁知道如何解决这个问题? Change the charset of the apache server maybe? 更改Apache服务器的字符集也许? I would be glad if anyone could help me figuring this out? 如果有人可以帮助我解决这个问题,我会感到高兴吗?

Yours, Tim 蒂姆,你的

try this: 尝试这个:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

and save your file as "UTF-8" format. 并将文件另存为“ UTF-8”格式。

I suggest your try using the charset UTF-8 instead: 我建议您尝试使用字符集UTF-8代替:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Or if you're developing for HTML5, you can use this shorter version: 或者,如果您正在开发HTML5,则可以使用以下较短的版本:

<meta charset="utf-8">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM