user833129
user833129

Reputation:

How to format accentuated letters ( like french letters )?

I created a php file to echo a french text , and I use this text in an ajax file ( the responseText ) . My problem is that when using the ajax function from javascript then I must show the french responseText into an alert ; so there is the problem of accentuated letters such as "à" or "é". In HTML we use é to format "é". So how to format "é" and "à" in PHP so that I can use them in javascript and ajax ?

Upvotes: 1

Views: 153

Answers (2)

Emeric L
Emeric L

Reputation: 55

Or you can use htmlentities() on your PHP string.

Upvotes: 0

bjornd
bjornd

Reputation: 22941

Use UTF-8 for php file encoding and type it in usual way.

Upvotes: 2

Related Questions