Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6698087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:32:10+00:00 2026-05-26T06:32:10+00:00

I am more than just confused. I do have some EditText, and it apparently

  • 0

I am more than just confused. I do have some EditText, and it apparently returns ISO-8859-1 or even mixed 8859-1+UTF8 strings.

My understanding until now was, that Android is fully UTF-8, so this can’t even happen.

Examples:
Inputting “wüste” into EditText. A string to hex returns this byte code:
57 fc 73 74 65, my expectation would be: 57 c3bc 73 74 65

Inputting “wüste テスト” returns 57 fc 73 74 65 20 30c6 30b9 30c8, which now even is a mix of extended 8859-1 and UTF-8.

Is this the expected and wanted behaviour? Can I change that somewhere?
I realized this behaviour when sending data using JSON to a server, and that one bailed out because of illegal UTF-8 chars.

Regards,
Oliver

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:32:11+00:00Added an answer on May 26, 2026 at 6:32 am

    Java (and therefore Android) strings are not UTF-8, but UTF-16. The bytes displayed are Unicode code points.

    You’ll need to convert your string to UTF-8 in order to send it as such (either directly, or via any JSON library you might be using). This can be done by calling getBytes("UTF8")
    on your string to get a byte array with the string in the desired encoding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

first time use JTree. Just wondering is it possible to have more than one
Maybe I have just designed this incorrectly, and if so I am more than
I'm struggling to create a table view controller that has anything more than just
It will be cooler, if BGW can report more than just progress, such as
I'm wanting to inherit from System.Web.Security.MembershipProvider - but I require more data than just
I just need to check if an array has more than one element. I
Adding source files more than one directory away (e.g. ../../source.cpp or ../../../somewhere_else/source.cpp, vs. just
Is hashing a password twice before storage any more or less secure than just
I have managed to get myself confused about some elements of memory management. I
More than once I've lost work by accidentally killing a temporary buffer in Emacs.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.