diff --git a/source/java/org/alfresco/repo/content/encoding/ContentCharsetFinder.java b/source/java/org/alfresco/repo/content/encoding/ContentCharsetFinder.java
index 2e3686c905..824e337156 100644
--- a/source/java/org/alfresco/repo/content/encoding/ContentCharsetFinder.java
+++ b/source/java/org/alfresco/repo/content/encoding/ContentCharsetFinder.java
@@ -79,11 +79,15 @@ public class ContentCharsetFinder
*
* @param is a stream that will not be affected by the call, but must
* support marking
- * @param mimetype the mimetype of the stream data
+ * @param mimetype the mimetype of the stream data - null if not known
* @return returns a characterset and never null
*/
public Charset getCharset(InputStream is, String mimetype)
{
+ if (mimetype == null)
+ {
+ return defaultCharset;
+ }
// Is it text?
if (!mimetypeService.isText(mimetype))
{