utf8 not converting string in PHP -


Hello, I have a German client and I'm getting the wire with the German alphabet, which I am trying to display properly in the output. I tried utf8_encode to convert the string but is not working for me.

code:

  echo "Desc short =>" Utf8_encode ($ obj-> Disco_Short) "& lt; br & gt; \ r \ n"; Echo "Desc Long =" Utf8_encode ($ obj-> Desc_Long). "& Lt; br & gt; \ r \ n";   

Output:

  Desc short = & gt; Abalagefatch mating in gape ?? Acam Trayrenvand; ESACO_UG (122) DCC Long = & gt; Ablaffac mating in gepà ?? ■ ¤ ¤ ¤ ¤ ¤ ¤ ¤ ren ren ren     It looks like you just need to use the php header to use utf8_decode and set the encoding. (Or set encoding to HTML document).  

For the following code:

  & lt ;? Php header ('content-type: text / html; charset = utf-8'); $ X = 'Apply Maze in Gape'? 'Akkarmatrenvand; ESACO_UG (122) '; Echo utf8_decode ($ x);   

The output for this is:

FLFFac MTG in JFKTrainWind; ESACO_UG (122)

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -