Our PHP
web application (PHP 5.6.30
running on Windows Server 2008 R2
) uses UTF-8
encoding but needs to import data from files that are encoded using Windows-1252
. When the data is imported it is converted to UTF-8
as follows.
iconv('Windows-1252', 'UTF-8', $value);
When we import the following sample data, the conversion works correctly for most of the Windows-1252
characters, but in line 8 below, the à
character gives problems and is not correctly converted.
1;€
2;é
3;è
4;ë
5;ï
6;ä
7;á
8;à
9;ç
10;ß
11;ø
12;í
13;ì
14;ñ
15;@
16;û
Here is a screenshot showing the result of displaying this data on the website.
Does anyone know why the PHP
iconv
is not correctly converting the à
character?