← Back to team overview

python-jenkins-developers team mailing list archive

[Bug 1421401] [NEW] xml job is uploaded with wrong encoding

 

Public bug reported:

I have a XML job generated with jenkinks job builder.

Job contains elements with non-latin characters for email plugin.

This XML job has <?xml version="1.0" encoding="utf-8"?> header and any editor properly
renders non-latin characters while viewing the XML file.

It seems like python-jenkins uploads this job to jenkins without specifiying encoding:
the job is created at jenkins, but non-latin characters are "mis-encoded".

After specifying 'charset=utf-8' at lines like
   - headers = {'Content-Type': 'text/xml'}
   + headers = {'Content-Type': 'text/xml; charset=utf-8'}

the problem is gone.

Reproducible with version 0.4.4

** Affects: python-jenkins
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1421401

Title:
  xml job is uploaded with wrong encoding

Status in Python API for Jenkins:
  New

Bug description:
  I have a XML job generated with jenkinks job builder.

  Job contains elements with non-latin characters for email plugin.

  This XML job has <?xml version="1.0" encoding="utf-8"?> header and any editor properly
  renders non-latin characters while viewing the XML file.

  It seems like python-jenkins uploads this job to jenkins without specifiying encoding:
  the job is created at jenkins, but non-latin characters are "mis-encoded".

  After specifying 'charset=utf-8' at lines like
     - headers = {'Content-Type': 'text/xml'}
     + headers = {'Content-Type': 'text/xml; charset=utf-8'}

  the problem is gone.

  Reproducible with version 0.4.4

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1421401/+subscriptions


Follow ups

References