BWCWeb
September 4, 2024, 1:28pm
1
i posted about this previously and have never really come up with an answer or fix, so i am trying again to see if there is any new insight.
I have a textarea (summernote) that saves to a mysql database. However, when i save the actual text in the editor, it puts in odd characters into the database.
I have verified that the odd characters are not there on the post, but somehow when i connect to my server update query, it saves them with the odd characters. Below are my screenshots and info
here is the content area
here is the data from the database update
here is the database setup
and here is the data saved in the column
can anyone see why this would be occuring?
Probably linked to the default character set you have the table set to.
Make sure it us utf8
Teodor
September 4, 2024, 1:48pm
3
You need to check the database collation and characterset also, not only the table columns settings.
BWCWeb
September 4, 2024, 4:05pm
4
i have it set in both places. What should it be changed to? its currenlty utf8_general_ci
brad
September 4, 2024, 4:26pm
5
All of my data tables are set to this and work without any problems.
BWCWeb
September 4, 2024, 5:03pm
6
changed both of the settings on the database and the table, but still has the issue.
brad
September 4, 2024, 5:06pm
7
Looks like you are pasting content from Word or some other source into your Text Area?
BWCWeb
September 4, 2024, 5:54pm
8
i'm actually typing in the apostrophe manually and it converts it to this odd character.
Teodor
September 4, 2024, 5:58pm
9
BWCWeb
September 4, 2024, 6:10pm
10
yes, it has been changed here as well
Teodor
September 4, 2024, 6:32pm
11
Some setting is not yet changed to utf8 then, if you still the apostrophe converted on db insert.
BWCWeb
September 4, 2024, 8:01pm
12
what crazier, is that when i made those changes to the structure, it made things worse for other characters that weren't even an issue before.
Teodor
September 4, 2024, 8:45pm
13
Please test with inserting new data, the old data won’t automatically be converted when you change from latin to utf8.