im trying to save to my data base a long text (about 2500
chars) input by my users using a web form and passed to the server using
php.
When i look in phpmyadmin, the text gets crop. How can i config my table in order to get the complete text? This is my table config:
Take a look of the field content that have a limit of 3000 chars, but the texts always gets crop at 690 chars. Thanks for any help!EDIT: I found the problem but i dont know how to solve it. The query is getting crop always in the same char, an special char: ù EDIT 2: This is the cropped query:
It gets crop just when the (ottenuto il punteggio più alto) phrase, just when ù appear...EDIT 3: I using jquery + ajax to send the query
|
|||||||||||
|
Answering to your updated question:
You're (apparently) trying to insert unicode text. And your table's charset is set to latin1 . That's not gonna fly.Change your table charset to utf-8.
More info here. |
|||||||
|
Try changing the table charset to the charset that support special characters...
|
|||
|
If the query is getting cropped at the character ù then you may have to replace that character with it's escaped equivalent.
|
|||
There seems to be no reason why the
content should be getting cropped. I tried running the INSERT statement
below, with the special "ù" character and it ran successfully.
What is the query that you have mentioned in EDIT 2? From where did
you print it? If that query is actually running in the backend, it will
always insert the cropped text because it itself doesn't contain the
full text - it is missing the "ù" character and everything following it.
Therefore, assuming that is the actual query, the cropping seems to be
happening elsewhere.I'm not sure how post requests are done in AJAX but is the data passed in the URL? If yes, I'll suggest you do a URL-Encode before sending the data. |
|||
Already solve the problem, was an jquery problem. You can check the answer here: TinyMCE + Jquery + PHP + AJAX Special chars issue
|
|||