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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:51:25+00:00 2026-05-22T16:51:25+00:00

I have a python script that outputs non-ascii characters. It works fine from the

  • 0

I have a python script that outputs non-ascii characters.
It works fine from the command line (which has LANG en_US.UTF-8), but once I try to run it in Jenkins (launched from the same shell), it fails in the typical manner of an ascii terminal:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 37: ordinal not in range(128)

I’ve tried preceeding the script call in the “Execute shell” build step like so:

export LANG=en_US.UTF-8

However, it seems to ignore that. Putting the following in my python script:

print "Encoding = %s" % sys.getdefaultencoding()

Gives me this, no matter what I do:

Encoding = ascii

So is there something that will allow me to force Jenkins to use UTF-8?

  • 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-22T16:51:26+00:00Added an answer on May 22, 2026 at 4:51 pm

    Never mind, found out how to do it:

    export PYTHONIOENCODING=UTF-8
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python script that, once executed from command line, performs the needed
I have a long-running Python script that I run from the command-line. The script
I have a python script that has to launch a shell command for every
Basically I have a script in Python that grabs the text from an open
I have a python script that runs continuously. It outputs 2 lines of info
So I have a python script that runs a loop in which it calls
Here's the scenario: I have a Python script that is called from a browser
I have a python script that is constantly grabbing data from Twitter and writing
I have a Python script that does something along the line of: def MyScript(input_filename1,
I have a python script that analyzes a set of error messages and checks

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.