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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:35:28+00:00 2026-05-27T19:35:28+00:00

My site needs to be able to serve data in different languages. I set

  • 0

My site needs to be able to serve data in different languages. I set it so it uses utf-8 and the db settings are set to that as well. I’ve been getting different different unicode errors over the admin.

For example:

  1. In the admin list, when a field from the list contains a non ascii char. (i get UnicodeDecodeError)
  2. When adding a new entry, a UnicodeEncodeError if the unicode method for the model returns an utf-8 decode (which fixes #1).
  3. When using a filter_horizontal in the admin, if data from the used model contains non ascii chars, then the filter disappears from the form.

If I set the unicode method for the model to return for example:

return u'%s' % unicode(self.tag)

That seems to fix #1 and #2, but then that’s when I get #3.

I have been looking a lot for a solution, but can’t find something that fixes all different errors. What’s the best way to deal with those?

  • 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-27T19:35:28+00:00Added an answer on May 27, 2026 at 7:35 pm
    from django.utils.encoding import smart_unicode
    ...
    def __unicode__(self): 
        return smart_unicode(self.tag)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m building a site that needs users created with different roles and permissions to
I have a site written in Delphi that needs to get data from a
I have a site that's growing large, and has very separate needs for different
I am making a program that get's it's data from a site that needs
I'm working on a site which needs to be able to support two or
We have a site that needs to (as part of our process) generate a
I'm building a web site that needs to stream video and be friendly for
I'm going to have a single site that needs to be themed a number
building a site using PHP and MySQL that needs to store a lot of
I'm in charge of an app that uses the internet to transfer data between

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.