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

  • SEARCH
  • Home
  • 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 6036827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:58:57+00:00 2026-05-23T05:58:57+00:00

I am trying to get a Google App Engine web app to send back

  • 0

I am trying to get a Google App Engine web app to send back UTF-8 encoded text to the browser.
I do this, by writing this:

byte[] utf8Bytes = "æøå".getBytes("UTF-8");

When I do this locally, I get a byte array with 6 bytes back.
When I do this on Google App Engine, I get an array with 12 bytes back. Weird, eh?

Does anyone know why?

I have succeeded in writing UTF-8 encoded text from GAE, by encoding the bytes myself,
and write the raw bytes back. Like this:

output.write(new byte[]{(byte)0xc3, (byte)0xa5, (byte) 0xc3, (byte)0xa6, (byte)0xc3, (byte)0xb8 });

And this actually works. But, does anyone have an answer to why the String’s are encoded differently on GAE, than they are locally?

Note: Encoding the characters via unicode escapes worked – like this:

byte[] utf8Bytes = "\u00E5\u00F8\u00E6".getBytes("UTF-8");
  • 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-23T05:58:57+00:00Added an answer on May 23, 2026 at 5:58 am

    The bytes you are getting from GAE makes me assume that the source code file with the “æøå” literal is saved as UTF-8, but compiled with a compiler which is expecting the source files to be encoded as ISO-8859-1, ISO-8859-15 or Cp1252.

    If you are building your source code with Ant or Maven, you have to specify the source file encoding in your build.xml or pom.xml.

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

Sidebar

Related Questions

I am trying to get Django 1.1 working on Google App Engine. I followed
I'm trying to get tipfy working on Google App Engine (GAE). I'm using Windows
In Google App Engine, I am trying to get a specific record and the
I'm trying to use restFB on Google App Engine, when I try and get
I am trying to set up Google App Engine unit testing for my web
I've been trying for a few days now to get Google App Engine to
I'm trying to get a package installed on Google App Engine. The package relies
I am trying to get my Django app (NOT using Google app engine) retrieve
I am trying to create the UI for a Google App Engine for Java
I'm trying to access an OAuth-protected resource on Google App Engine using a Java/Groovy

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.