0

I have a question , i have read all the possible answers but i don't find the solution. i have data in mysql but when i select data from mysql and show it in html web page then it doesn't show german charcters correctly. My code is:

    INSERT INTO `extra_ingredients` (`extra_Ingredient_Serial`, `extra_Ingredient_Category`, `extra_Ingredient_Sub`, `extra_Ingredient_Name`) VALUES  
(NULL, 'Pizza', '1', 'Sahnesauce'), 
(NULL, 'Pizza', '1', 'Dönerfleisch'), 
(NULL, 'Pizza', '1', 'Schafskäse');

SQL DATA Table

as you can see in the table data is shown correctly but when i select with query and output in html page it shows something line this. WEbPage Screenshot

how can i resolve the issue . any help will be appreciated. Note I am using "UTF-8" in HTML page and "utf8mb4_german2_ci" in HTML I have also tried with "utf8_german2_ci" , "utf8_unicode_ci". i have entered data using sql query tab NOT using any HTML form, so i dont know why my data is encoded or decoded correctly while outputting in Html page.

Update: when i entered data using HTML form then it outputs fine but it has saved not the same in mysql table i entered "soße" from HTML table in mysql table "soße" in web page after selcting from mysql table "soße"

I dont want to enter data from HTML page because the data will be entered only once and with query i can insert all rows at once using query tab.

Community
  • 1
  • 1
Amir Ahmad
  • 61
  • 1
  • 5
  • The gravy is not rotten, its encoding is. `soße` is Mojobake; see https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored The "black diamond" case is also discussed there. You probably have (or had) latin1 in the history of that database. (The `COLLATION` is not relevant, jus the `CHARACTER SET`.) – Rick James Jun 07 '22 at 04:56
  • See "black diamond" and "Mojibake" in https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored – Rick James Jun 23 '22 at 05:09

0 Answers0