I'm using the Sqlcipher library to encrypt my Database in Android. Everything is ok when i create or open the database but if in my script before encrypt the data base there a special character, the encrypt is putting a "?".
INSERT INTO [fr_preguntas_x_formularios] ([idPregunta], [idFormulario], [descripcion], [tipoCampo], [tipoCampoDetalle], [respuesta], [sw_obligatorio], [min_rango], [max_rango], [separador_numerico], [expresion_regular]) VALUES (4, 1, 'Niveles de azúcar en la sangre (ng)', 'numerico', ',,300&1000__#,###', null, '', null, null, null, null);
when i'm obtaining the "description" I receive "Niveles de az?car en la sangre (ng)"
How can i solve this?
I'm creating my database with this code
try {
File file = new File(Environment.getExternalStorageDirectory()
.getPath() + "/dbtest/" + DATABASE_NAME_SCRIPT);
InputStream stream = new FileInputStream(file);
InputStreamReader inputStreamReader = new InputStreamReader(stream);
BufferedReader bufferedReader = new BufferedReader(
inputStreamReader);
String line;
String strSentenciaSql = "";
int cont = 0;
while ((line = bufferedReader.readLine()) != null) {
if (!line.contains("--") && !line.isEmpty()) {
strSentenciaSql += line;
if (line.contains(";")) {
database.execSQL(strSentenciaSql);
strSentenciaSql = "";
System.out.println(cont);
cont++;
} else {
strSentenciaSql += " ";
}
}
}
bufferedReader.close();
inputStreamReader.close();
stream.close();
} catch (Exception e) {
e.printStackTrace();
}
}