Hello,
I have two programs- First one being a C program that writes in to mysql database. Second is a java program that reads the data from mysql database. The C program reads list of files in a particular directory and inserts the file names in DB. The Java program reads these rows and tries to do some file processing using these file names.
A particular file name contains a long dash '–' character. This fileName is read from DB by the java program. But when it tries to open the File on filesystem for this entry, the file names won't match.
When I read the file name (containing the '–' character) directly from file system using Java, the bytes for '–' character is shown as [-30 -128 -109]. Whereas the bytes shown when Java reads the fileName from DB (fileName dumped by C program), the bytes for '–' character is shown as [-61 -94 -30 -126 -84 -30 -128 -100] in Java.
Is this something to do with the Charset used by C program to put entried in to mysql?
Please help..
Thanks,
-Keshav