2013-07-01 1 views

Répondre

1

Est-il possible que la modification du jeu de caractères par défaut retourné dans com.android.volley.toolbox.HttpHeaderParser et la méthode parseCharset peut vous aider?

Quelque chose comme

/** 
    * Returns the charset specified in the Content-Type of this header, or the 
    * UTF-8 if none can be found. 
    */ 
    public static String parseCharset(Map<String, String> headers) { 
     String contentType = headers.get(HTTP.CONTENT_TYPE); 
     if (contentType != null) { 
      String[] params = contentType.split(";"); 
      for (int i = 1; i < params.length; i++) { 
       String[] pair = params[i].trim().split("="); 
       if (pair.length == 2) { 
        if (pair[0].equals("charset")) { 
         return pair[1]; 
        } 
       } 
      } 
     } 
     return HTTP.UTF_8; 
    }