Paul Verest
Paul Verest

Reputation: 63912

Perforce & Jenkins change comments encoding spoiled

We have Perforce for source control and Jenkins for Continuous Integration. They are integrated using JENKINS Perforce Plugin. Eclipse IDE with P4Eclipse (the Perforce Plug-in for Eclipse) for developing/committing.

There problem is that changes comments (usually wrote in Chinese) get spoiled. (Sources with Chinese comments are compiled without this problem.)

What is the reason? How to fix?

Where Perforce Server and JENKINS plugin encoding is set?

Change comments are spoiled

UPDATE August 2014

While browsing /jenkins/systemInfo page of Jenkins I noticed that property file.encoding had value CP1252 (see Windows-1252) as that Jenkins was running on Windows. Because that properties are actually properties of Tomcat, we set up UTF-8 using one of option inside Change Tomcat's Charset.defaultCharset in windows . After Tomcat restart we got file.encoding UTF8, but it did not solved the problem.

Once again, Sources are in UTF-8 and they have no problem after arriving on Jenkins server. It is about commits comments.

UPDATE 2:

It is not browser related as comments within Java code are shown correctly.
We took closer look and found that Jenkins stores changes comments in xml file per every job. And in that file encoding is already spoiled.

Upvotes: 7

Views: 1366

Answers (1)

Slav
Slav

Reputation: 27485

Have you tried changing the page-encoding on the browser itself?

Depends on the browser, but on Firefox, you would click View -> Character Encoding -> Chinese

Upvotes: 2

Related Questions