mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
force UTF-8 encoding for python and mercurial
This commit is contained in:
@@ -96,6 +96,15 @@ public class AbstractHgHandler
|
||||
/** Field description */
|
||||
public static final String ENV_REVISION_START = "SCM_REVISION_START";
|
||||
|
||||
/** Field description */
|
||||
public static final String ENV_PYTHONIOENCODING = "PYTHONIOENCODING";
|
||||
|
||||
/** Field description */
|
||||
public static final String ENV_HGENCODING = "HGENCODING";
|
||||
|
||||
/** Field description */
|
||||
public static final String ENCODING = "UTF-8";
|
||||
|
||||
/** the logger for AbstractHgHandler */
|
||||
private static final Logger logger =
|
||||
LoggerFactory.getLogger(AbstractHgHandler.class);
|
||||
@@ -432,6 +441,10 @@ public class AbstractHgHandler
|
||||
|
||||
Map<String, String> env = pb.environment();
|
||||
|
||||
// force utf-8 encoding for mercurial and python
|
||||
env.put(ENV_PYTHONIOENCODING, ENCODING);
|
||||
env.put(ENV_HGENCODING, ENCODING);
|
||||
|
||||
if (context.isSystemEnvironment())
|
||||
{
|
||||
env.putAll(System.getenv());
|
||||
|
||||
@@ -53,7 +53,7 @@ def openRepository():
|
||||
|
||||
def writeXml(doc):
|
||||
# print doc.toprettyxml(indent=" ")
|
||||
print doc.toxml()
|
||||
doc.writexml(sys.stdout, encoding='UTF-8')
|
||||
|
||||
def createChildNode(doc, parentNode, name):
|
||||
node = doc.createElement(name)
|
||||
|
||||
Reference in New Issue
Block a user