1

I have this HTML document with javascript that delivers AJAX funtionality:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<script
...
getRequest(
      'myAjax.php?url='
...
</body>
</html>

In this HTML file all "üöä..." are shown correct. But in this code I make a AJAX to the myAjax.php?url='...' file. It returns the content I want. Including text. But this Text appears then with charset errors like: gef�hrdet or w�nschen

What can I do?

Flex Texmex
  • 1,074
  • 2
  • 11
  • 23

1 Answers1

0

Most likely you don't transmit the content from myAjax.php encoded as UTF-8 but ISO-8859-1 or something. You need to set the UTF-8 content encoding in your PHP.

Maybe this or that helps.

Johannes Jander
  • 4,974
  • 2
  • 31
  • 46