I am trying to save some Indian language content (read Hindi) from a website into a column in MySQL database. I am using SpringBoot and JPA to scrape the website and write the content.
Everything works fine on my local system (OSX). The same code is deployed on Ubuntu 16.04 LTS. It works fine except that the content of the relevant db column shows '????'. I presumed that it might be a problem with the COLLATION and CHARACTER SET of MySQL of the prod instance.
Indeed MYSQL version on my local machine was 8.x. The COLLATION on local db was utf8mb4_0900_ai_ci. The version on prod was 5.6, the COLLATION being utf8_x_x. Apparently, utf8mb4_0900_ai_ci, is not available for versions prior to 8.x.
I tried changing the COLLATION of columns (the entire schema for that matter) on local machine to utf8mb4_general_ci, as well as utf8mb4_unicode_ci. Both works fine on local DB. But the same collation, namely utf8mb4_general_ci & utf8mb4_unicode_ci still gives '?????' in the prod environment!
Could this be a problem other than 'COLLATION'? I am able to print the Hindi content on terminal, both on local and Ubuntu deployment. The problem is less likely with the client, as the same client (Datagrip) shows local schema content nicely and ubuntu DB content as cryptic question marks.
Have googled for two days. Any help would be appreciated.