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 6148181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:14:10+00:00 2026-05-23T19:14:10+00:00

I am using UTF-8 encoding to try and send a byte array from my

  • 0

I am using UTF-8 encoding to try and send a byte array from my android application to my .NET server.

In my eclipse code(java) I retrieve the byte array from my database then I convert it to a UTF-8 string before sending it to the server.

byte[] b = db.getMyByteArray();
try 
{
s = new String(b, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}

I have no problems with sending the data. It gets to my server through an HTTP POST and I use the following c# code to try and convert the string back to a byte array.

Byte[] bytesUTF8 = System.Text.Encoding.UTF8.GetBytes(x.Signature);

However after comparing the bytes they are not the same.

Is there something I am doing wrong? Do I need to use a different method to send byte arrays to my server?

  • 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-23T19:14:11+00:00Added an answer on May 23, 2026 at 7:14 pm

    I figured out my own question. The solution was to send the byte array as a JSON array instead of trying to convert it to a string.

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

Sidebar

Related Questions

i was using Iconv library on Ruby to convert encoding from UTF-8 to UTF-32,
I am trying to send a GET request to a REST server using Java.
I'm using Server.HtmlEncode on a utf-8 string in asp-classic, which works fine until there
I'm using SimpleXML and xpath to read elements from an external UTF-8 XHTML document.
i try to parse an rdf file using android.sax and android.utils.Xml methods. My parser
I am using urlfetch to fetch a URL. When I try to send it
Previously, to read XML in UTF-8 encoding through xstream, I am using DomDriver as
I have one page and it's encoding is UTF-8 and If i try to
Some of my script are using different encoding, and when I try to combine
I'm trying to send an xml message to a server from a client app

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.