Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue with Encoding in android-async-http-1.4.5 Library #1390

Open
@liboyan666

Description

@liboyan666

I'm encountering an issue when using the android-async-http-1.4.5 library for network requests in my Android application. Specifically, when I attempt to parse the response body, which is in the form of bytes, into a string using new String(responseBody), I'm getting garbled characters (乱码). This was not an issue with the previous version of my backend database.

Steps to Reproduce:

Use the android-async-http-1.4.5 library for making network requests.
Receive a response body in the form of bytes.
Attempt to convert the byte array to a string using new String(responseBody).
Observe the presence of garbled characters in the resulting string.
Expected Behavior:
The decoded string should accurately represent the content of the response body without any character encoding issues.

Additional Information:

Version of android-async-http library: 1.4.5
Previous version of the backend database did not exhibit this issue.
I would appreciate any insights or suggestions on how to resolve this problem. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions