0

I am trying to read an rss feed which data is written in Portuguese language.

What I want

  1. I read rss
  2. Storing title and description in variables
  3. Then storing those variables in MYSQL using insert query

But when data inserting in database then some texts are in bad format

for example the actual title in rss feed is

 problema com funções

but when store in my database then it store as following

 problema com funções

I am using following code

 $title=trim(htmlentities($title, ENT_QUOTES, "UTF-8"));

Same happening with description too. also I want to remove html tags also from description.

Anybody can help me?

thanks in advance

Amit Verma
  • 40,709
  • 21
  • 93
  • 115
  • Those two strings are the same, – phuzi Jun 03 '15 at 08:15
  • here's a [very extensive post](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) on encoding. Basically it can go wrong in many places but once your setup is correct you're OK for most (if not all) languages... – Laurent S. Jun 03 '15 at 08:18
  • the stackflow conver my bad char string to normal string. this is what i want to do. convert portueges bad char to norma – Free Tutorials Jun 03 '15 at 12:06

0 Answers0