diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
index 97a9f76020143e459b6cd8f0cb939f36d784e468_aGdleHQvY29udmVydC9fX2luaXRfXy5weQ==..b810b59eca62f14afcb47bf5d8d3fd6c143abed4_aGdleHQvY29udmVydC9fX2luaXRfXy5weQ== 100644
--- a/hgext/convert/__init__.py
+++ b/hgext/convert/__init__.py
@@ -326,8 +326,11 @@
     usually should specify a target directory, because otherwise the
     target may be named ``...-hg``.
 
-    It is possible to limit the amount of source history to be
-    converted by specifying an initial Perforce revision:
+    The following options can be set with ``--config``:
+
+    :convert.p4.encoding: specify the encoding to use when decoding standard
+        output of the Perforce command line tool. The default is default system
+        encoding.
 
     :convert.p4.startrev: specify initial Perforce revision (a
         Perforce changelist number).
diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py
index 97a9f76020143e459b6cd8f0cb939f36d784e468_aGdleHQvY29udmVydC9wNC5weQ==..b810b59eca62f14afcb47bf5d8d3fd6c143abed4_aGdleHQvY29udmVydC9wNC5weQ== 100644
--- a/hgext/convert/p4.py
+++ b/hgext/convert/p4.py
@@ -39,6 +39,9 @@
 
 class p4_source(converter_source):
     def __init__(self, ui, path, revs=None):
+        # avoid import cycle
+        import convcmd
+
         super(p4_source, self).__init__(ui, path, revs=revs)
 
         if "/" in path and not path.startswith('//'):
@@ -54,7 +57,8 @@
         self.tags = {}
         self.lastbranch = {}
         self.parent = {}
-        self.encoding = "latin_1"
+        self.encoding = self.ui.config('convert', 'p4.encoding',
+                                       default=convcmd.orig_encoding)
         self.depotname = {}           # mapping from local name to depot name
         self.localname = {} # mapping from depot name to local name
         self.re_type = re.compile(
diff --git a/tests/test-convert.t b/tests/test-convert.t
index 97a9f76020143e459b6cd8f0cb939f36d784e468_dGVzdHMvdGVzdC1jb252ZXJ0LnQ=..b810b59eca62f14afcb47bf5d8d3fd6c143abed4_dGVzdHMvdGVzdC1jb252ZXJ0LnQ= 100644
--- a/tests/test-convert.t
+++ b/tests/test-convert.t
@@ -275,6 +275,5 @@
       that when a depot path is given you then usually should specify a target
       directory, because otherwise the target may be named "...-hg".
   
-      It is possible to limit the amount of source history to be converted by
-      specifying an initial Perforce revision:
+      The following options can be set with "--config":
   
@@ -280,4 +279,8 @@
   
+      convert.p4.encoding
+                    specify the encoding to use when decoding standard output of
+                    the Perforce command line tool. The default is default
+                    system encoding.
       convert.p4.startrev
                     specify initial Perforce revision (a Perforce changelist
                     number).