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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:29:00+00:00 2026-06-09T04:29:00+00:00

How do I configure a minidom instance to have a unicode codec? Processing this

  • 0

How do I configure a minidom instance to have a unicode codec?

Processing this snippet in an XML file:

<title type="text">ME850单片机开发实验仪(增强配置)(产品浏览)-伟纳电子-http://www.willar.com/</title>

produces this error:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-12: ordinal not in range(128)

update: works as expected in Python 3; apparently this is a known limitation of 2.x.

  • 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-06-09T04:29:01+00:00Added an answer on June 9, 2026 at 4:29 am

    In Python 2.x, minidom can only parse byte strings. Either don’t decode your document in the first place (hint: a more specific suggestion would require the code you’re running), or encode it into UTF-8.

    Alternatively, you can switch to Python 3.x, where minidom can handle bytes as well as character strings.

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

Sidebar

Related Questions

How do I configure CFWheels to display the following XML at http://mydomain.com/sitemap.xml ? <?xml
Im trying to configure a .htaccess RewriteRule and i'm struggling. I have a domain
How can I configure hibernate sessionFactory in Spring such that it uses the hibernate.cfg.xml
I have tried to configure the URLs in my DispatcherServlet to map to URLs
My configure.in file has LT_VERSION=1.1 . I am using the latest version of autoconf
I configure a flow in mule-config.xml based on the documentation( click here ). Here
Steps to install: ./configure --enable-R-shlib I get this error: configure: error: --with-x=yes (default) and
I configure the default document of site http://www.modapik.com as index.aspx in both IIS and
I have tried to configure a new virtual host in apache. I have copied
// Configure the cell. cell.textLabel.text = [[self.drinks objectAtIndex:indexPath.row] objectForKey:@Name]; return cell; The above code

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.