I have seen in ORMLite documentation that stored strings with unicode symbols you have to use String (DataType.STRING_BYTES). But Have I to change the String attribute for a ArrayBytes too?
Until now I have used @DatabaseField(dataType = DataType.STRING_BYTES) above my String attribute, but this not work.
Model
@DatabaseTable(tableName="Messages")
public class Message {
@DatabaseField(dataType = DataType.STRING_BYTES)
private String message;
//get and set methods...
...
}
Activity
...
TextView message = new TextView(this);
message.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.WRAP_CONTENT));
message.setText(m.getMessage());
linearLayout.addView(message);
...
It was a problem of Eclipse. This code run perfectly.
For any reason sometimes, Eclipse has replaced some symbols like accents and other special letters for odd symbols. And it was doing it when it was saving my source code.