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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:49:22+00:00 2026-05-30T02:49:22+00:00

I am working in a Python program with Javascript and DB. I have been

  • 0

I am working in a Python program with Javascript and DB. I have been having some problems managing the written accent marks (á,é,í,ó,ú). First my program displays some text inputs so the user writes information. When the user clicks an “ACCEPT” button, a javascript takes that information and sends it to another python program which is going to save that information on a database. The next time the user enters, the info saved on the database would be displayed instead of the text inputs.

My problem is when the information has any accent mark on it. At first I though it was a problem with javascript so I start working on replaces functions. Then i saw that the information was saved on the database with the accent mark, so the problem is not with the javascript function, or the database.

The information is taken from the database and it displays the accent marks very well. Then a javascript takes that value and if I put an alert with that value, it displays the accent mark very well. That javascript sends that value on a URL with AJAX to another python program. This python receives that value but when print it, it is modify. The accent mark is not longer displayed, but a little square. I receive the values with this code (I have been using this many times):

form = cgi.FieldStorage()
area = form.getfirst("area")

So i started tasting again the python replace function to change that character to the apropiate accent mark. I been trying something like: area.replace("\u00e9","é") for (é). But it does not work.

I also have this in my programs: # -*- coding: iso-8859-1 -*- which works for special characters.

I need to find out the way python represents the accents so I can replace them.

  • 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-30T02:49:24+00:00Added an answer on May 30, 2026 at 2:49 am

    You need to back up here.

    Set a coding of utf-8 (# -*- coding: utf-8 -*-), and use an editor that works with unicode.

    Declare your constants, and generally operate with, unicode strings like u'hélas'.

    As if by magic, accents will work (as long as your database handles unicode correctly; ensure that it does).

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

Sidebar

Related Questions

I am working on a program using python, HTML and javascript. I have two
I have recently been working with Python using Komodo Edit and other simpler editors
I have a working Python based program that I want to run as a
I'm having troubles getting this to work. Basically I have a python program that
I have a python program with a wxpython GUI and some command line parameters.
I usually script/program using python but have recently begun programming with JavaScript and have
I have a program written in python, and I would like to make it
I'm working with python and javascript and I'm having a problem in a specific
I have a working python 2.7 program that calls a DLL. I am trying
I am having problems with this Python program I am creating to do maths,

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.