I use the GAE datastore for a Java application and save some text that will be in many languages. In my servlet, I first check to see if there is any data in the data store, and if not, I create some that look like the following:
ArrayList<Lang> list = new ArrayList<Lang>();
list.add(new Lang("EN", "English", 1));
list.add(new Lang("ES", "Español", 0));
PersistenceManager pm = PMF.get().getPersistenceManager();
for(Lang l : list) {
pm.makePersistent(l);
}
Since this uses JDO, I think I should include the relevant parts of the class as well Lang:
@PersistenceCapable
public class Lang {
@PrimaryKey
private String code;
@Persistent
private String name;
@Persistent
private int popularity;
}
, ASCII, . , Eclipse UTF-8 Cp1252, , , App Engine , AdWords Espaà ± ol, , , 500 Server Error. ( , , ...)
- , GAE, UTF-8? Eclipse, -, Java?