2
Hello,
I made a program in Java that inserts several texts in a database, running from my machine (Mac Os), everything works very well. But, putting in a VPS (Windows) for the program to run 24/7, the seats in the Bank get bugged, as for example:
"integrante do �lbum "Ladrão"
I am running the program via a . bat that contains only the line:
java -jar "C:\Users\Administrator\Desktop\JavaApplication27.jar"
Connection via jdbc to a Mysql database (from a Cpanel/Hosting) hosted at Hostgator.
static final String DB_URL = "jdbc:mysql://br934.hostgator.com.br:3306/"+DB+"?useUnicode=true&characterEncoding=utf8";
The database has the charset in utf8mb4.
What is the program?
It hits a Youtube API, bringing the title and description of various videos, and many contain special characters and even emoticons.
--
In summary, I made a program in Netbeans in Java, after compiled, when I run the . jar on Mac Os, it works without any problem, but when I run it. jar in Windows Server 2012 R2 Standard all accents that go pro INSERT INTO, get bugged in the database, as the example above.
How can I resolve the issue with the accent being inserted wrong when the program is running on windows?
Please provide more information through edit and read about How To Ask and also a tour
– Amadeu Antunes
@Amadeuantunes what kind of more information is needed?
– Felipe
What database is used and how do you connect to it?
– bfavaretto
Mysql, hosted on Hostgator, connected by jdbc
– Felipe