pycontribs / jenkinsapi

A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
http://pypi.python.org/pypi/jenkinsapi
MIT License
858 stars 485 forks source link

Logging text always decoded as ISO-8859-1, regardless of what encoding was used. #842

Open SamTheisens opened 1 year ago

SamTheisens commented 1 year ago
ISSUE TYPE
Jenkinsapi VERSION

0.3.13

Jenkins VERSION

2.319.2

SUMMARY

Jenkins console text is decoded as ISO-8859-1 latin, regardless of how the text is encoded

EXPECTED RESULTS

UTF-8 encoded output is decoded as such. For example, a line of text containing emoji like the following, should be decoded using the encoding as specified in the HTTP response. Example log line:

  ❌ Outdated version: 96.1071 (latest: 0.0.16)  
ACTUAL RESULTS

The text is decoded as ISO-8859-1, resulting in garbled text:

  ❌ Outdated version: 96.1071 (latest: 0.0.16)    
USEFUL INFORMATION

build: Build = job.get_build(build_number)
print(build.get_console())