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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:31:12+00:00 2026-05-22T18:31:12+00:00

I have a Python application that gets multilingual information from websites, and it presents

  • 0

I have a Python application that gets multilingual information from websites, and it presents them in a small GUI window (wxpython based).
I (currently) don’t use any specific unicode statements in my source files.

Now, when I run my python application from within Eclipse, French characters (like ë) are displayed nicely, when I run it from a py2exe packaged version, the character go wonky.
I don’t really understand why as the building with py2exe doesn’t produce unicode or encoding related errors.

However, to fix this issue, and following this article, I wrapped my strings in a unicode(my_string, "utf-8") call just before outputting it to screen. This solves it.

Questions:

  • Is wrapping strings in a unicode() call just before displaying the good way to do it?
  • why does it work without the unicode conversion from within Eclipse, but not from a windows packaged .exe version?

I tried wrapping my head already many times around unicode, but it seems I am not unicode compatible 😐

  • 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-22T18:31:13+00:00Added an answer on May 22, 2026 at 6:31 pm

    The best approach is to ensure the strings are unicode as soon as possible. If the library you are scraping websites with are not proving you with unicode then they are not doing what they should (imho). Then you have to your self decode them to unicode using the same encoding that the web pages you are scraping is using.

    Your approach is basically the opposite, decoding as late as possible. That it has worked so far is basically just pure luck because you have not encountered any non-utf8 strings yet. Any iso-8859-1 strings will break your app.

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

Sidebar

Related Questions

I have a Python application (with GUI, using PyQt4) that gets spawned by the
I have a Python application that, to be brief, receives data from a remote
I have a small web.py Python application that I would like to serve under
I have an application that reads test scripts in python and sends them across
I have a python application that relies on a file that is downloaded by
Long story short, I have a substantial Python application that, among other things, does
We have a Linux application that makes use of OpenSSL's Python bindings and I
I want to run javascript/Python/Ruby inside my application. I have an application that creates
I'm writing a python application that has a glade gui. Using subprocess to execute
I have written a small Python application where I use PyGame for displaying some

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.