Question: Hello i have german client and i am getting string with german alphabet which i am trying to display properly in output.I tried utf8\_encode to convert string but not working for me.

Code:

```
    echo "Desc Short=>". utf8_encode($obj->Desc_Short) . "<br>\r\n";
    echo "Desc Long=>". utf8_encode($obj->Desc_Long) . "<br>\r\n";

```

Output:

```
Desc Short=>Ablagefach mittig in GepÃ¤ckraumtrennwand;ESACO_UG(122)
Desc Long=>Ablagefach mittig in GepÃ¤ckraumtrennwand inkl. verschiebbarem Haltenetz

```

Answer: 
It seems you need to simply use utf8\_decode and use php header to set encoding (or set encoding in HTML document).

For the following code:

```
<?php

header( 'Content-type: text/html; charset=utf-8' );
$x = 'Ablagefach mittig in GepÃ¤ckraumtrennwand;ESACO_UG(122)';

echo utf8_decode($x);

```

Output for this is:

> 
> Ablagefach mittig in Gepäckraumtrennwand;ESACO\_UG(122)
> 
> 
>
Your output indicates that the string is already utf-8 encoded. 

Either you would have to use utf8\_decode() to get the umlaut or - better - change any component in your application to properly handle utf-8. :)