Welcome Guest, Not a member yet? Register   Sign In
Active Record and special chars... help!
#1

[eluser]Unknown[/eluser]
Hi there, I have a problem in doing some db operations.

When I insert or update some data into the database, special characters are automatically eliminated.

Example:

if I insert the string "test stringèò 123"

the result will be "test string 123"

Before someone will ask, I'm already using active record. I've also tried using functions as htmlentities or htmlspecialchars, but nothing happened.

Any ideas?

EDIT: I've also tried using a direct insert query, no results.

EDIT 2: I've tried using $_POST instead of $this->input->post(). No results.
#2

[eluser]Aken[/eluser]
Have you verified that the characters are not eliminated BEFORE the query? Try to run a direct query with no other variables - write the query out yourself, including the characters. If they are removed, then it is a database setting problem. If it works, then the data is being manipulated before the query somewhere.
#3

[eluser]Unknown[/eluser]
Resolved Smile

The problem was with the page encoding... I was sure about my template using utf-8, but it was using another one. However, thanks for your reply!




Theme © iAndrew 2016 - Forum software by © MyBB