title: Encode special characters from JSON (äöüß)
body: <p>I develop a German App right now, it fetches the data from a JSON to a ListView. Since there are some special characters such as üöäß, with my code below, those characters are displayed as <strong>?</strong>.</p>
  
  <pre><code>public class LooserSync extends IntentService {
  
      public LooserSync() {
          super("LooserSyncService");
      }
  
      @Override
      protected void onHandleIntent(Intent intent) {
          Database.OpenHelper dbhelper = new Database.OpenHelper(getBaseContext());
          SQLiteDatabase db = dbhelper.getWritableDatabase();
          DefaultHttpClient httpClient = new DefaultHttpClient();
          db.beginTransaction();
          HttpGet request = new HttpGet(
                  "http://liebenwald.spendino.net/admanager/dev/android/projects.json");
          try {
              HttpResponse response = httpClient.execute(request);
              if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
                  InputStream instream = response.getEntity().getContent();
                  BufferedReader r = new BufferedReader(new InputStreamReader(
                          instream), 8000);
                  StringBuilder total = new StringBuilder();
                  String line;
                  while ((line = r.readLine()) != null) {
                      total.append(line);
                  }
                  instream.close();
                  String bufstring = total.toString();
                  JSONArray arr = new JSONArray(bufstring);
                  Database.Tables tab = Database.Tables.AllTables.get(Database.Project.NAME);
                  tab.DeleteAll(db);
                  for (int i = 0; i &lt; arr.length(); i++) {
                      tab.InsertJSON(db, (JSONObject) arr.get(i));
                  }
                  db.setTransactionSuccessful();
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
          db.endTransaction();
          db.close();
  
      }
  
  }
  </code></pre>