4

I have a web page, and if I open it in windows notepad, a piece of text looks like this

Avertissement sur la sécurité

But if I open it in notepad++, it looks like

enter image description here

Notepad++ also says the file is in utf-8 encoding too.

If I open it in a browser, it looks like

enter image description here

I have

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> on top too.

Does anyone know how I can fix this?

Thanks

d.coder
  • 1,988
  • 16
  • 23
omega
  • 40,311
  • 81
  • 251
  • 474

1 Answers1

6

You have to make sure the encoding on <meta> is the same like the file encoding (on Notepad++).

You want to use UTF-8?

  • On Notepad++ select Encoding -> UTF-8 (without BOM) and save the file.
  • Use <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

You want to use ISO-8859-15?

  • On Notepad++ select Encoding -> ISO-8859-15 and save the file.
  • Use <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
Sebastian Brosch
  • 42,106
  • 15
  • 72
  • 87