Jump to content

Write ìíóò letter to csv and display out


phppaper

Recommended Posts

An easy solution to this is to convert the characters to HTML entities, using the htmlentities function. You can then use html_entity_decode to decode them, if needed. If you're outputting to a web page it's better to leave them as HTML entities however.

Thanks for the answer but after  htmlentities()  and html_entity_decode() the ìíóò into the csv, I still get funny symbols.

 

and the html translate is wrong aswell, example I get for í :

 

ó    which I support to get í but I get ó

 

Any thought?

There really is only so much you can do to help a user, you can't be responsible for their retardedness.

 

but I guess MrAdam has a good point, not sure if it will work..

 

$decoded_string = html_entity_decode($string, ENT_QUOTES, 'UTF-8');

cannot yet handle MBCS in html_entity_decode()

 

but I rewrite the function: $utf8_encode = utf8_encode(html_entity_decode($string));

according to http://php.net/manual/en/function.html-entity-decode.php

Still funny symbol showing

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.