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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:36:39+00:00 2026-05-25T22:36:39+00:00

When I type the text gå in a swedish web page, the html generates

  • 0

When I type the text “gå” in a swedish web page, the html generates the following field: g%E5. That is, the letter a-ring (å) is coded as %E5. I assume that they are using ISO-8859-1.

If I generate the same html address using a Python 3.0 script the string “gå” is coded as g%C3%A5. Now the letter a-ring(å) is coded as %C3%A5. I assume that Python 3.0 (string)is using utf-8 to code the a-ring in this way.

How can I use Python 3 to generate the html address with g%E5?

  • 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-25T22:36:40+00:00Added an answer on May 25, 2026 at 10:36 pm

    I created this Python source file:

    #coding: utf-8
    print repr(u"gå".encode("ISO-8859-1"))
    

    and got

    'g\xe5'
    

    as output.

    I’m using Python 2, but it should be the same for Python 3 without the u before the unicode literal, possibly without the coding line, and with ascii instead of repr.

    So it should be as simple as specifying "ISO-8859-1" as the encoding.

    Without seeing your exact code I can’t tell you where specifically to do that. Check out the docs for whatever you’re using for how to set the encoding.

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

Sidebar

Related Questions

In an oscommerce site I have the following: Server response = Content-type: text/html;charset=UTF-8 and
I have a field in MySQL of type text, using the following collation: utf8_general_ci
I understand that text_field creates an input field of type text , while email_field
I have a field ' sessionid' of type text in an html form. I
Example: my $page = $args{'p'}; exit 1 if $page =~ /[^\d\w]/; print Content-Type: text/html\n\n;
I have a field that is type text and I want to convert it
Here is my try: @header(Content-type: text/html; charset=utf-8); @header(Location:/index.php); @header(Cache-Control: no-cache, must-revalidate); // HTTP/1.1 @header(Expires:
I have a type ahead text field, and when the user hits Enter I
I can type text into a field using WebElement.sendKeys() but editing doesn't work: I
A Table has Field: data Type: text select data from t1 where id =

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.