[ 
http://jira.nuxeo.org/browse/NXP-4658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=68500#action_68500
 ] 

Alexey Ustenko commented on NXP-4658:
-------------------------------------

There is the diff:

nuxeo/nuxeo-features/nuxeo-platform-wss-backend/src/main/java/org/nuxeo/ecm/platform/wss/backend/SimpleNuxeoBackend.java

@@ -124,6 +124,10 @@
                         doc = child;
                         break;
                     }
+                    else if (blob!=null && new 
String(blob.getFilename().getBytes(), "ISO-8859-1").equals(filename)) {
+                        doc = child;
+                        break;
+                    }
                 }
             }
         }
@@ -389,7 +393,7 @@
 
             List<String> userNames = new ArrayList<String>();
             for (WSSListItem item : documents) {
-                if (!userNames.contains(item.getAuthor())) {
+                if (item.getAuthor() != null && 
!userNames.contains(item.getAuthor())) {
                     userNames.add(item.getAuthor());
                 }
                 String[] contributors = 
(String[])(((NuxeoListItem)item).getDoc().getPropertyValue("dc:contributors"));


> Cannot open a Nuxeo document with non-latin letters in a name in MSWord
> -----------------------------------------------------------------------
>
>                 Key: NXP-4658
>                 URL: http://jira.nuxeo.org/browse/NXP-4658
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>          Components: WSS integration
>    Affects Versions: 5.3 GA
>         Environment: Windows Vista,
> MS Word 2003
>            Reporter: Alexey Ustenko
>         Attachments: SimpleNuxeoBackend.java
>
>
> I have a document with a MSWord file that contains non-latin (e.g. 
> icelandic/cyrillic) letters in its name.
> MSWord shows it correctly in the open dialog. Altough wen I try to open the 
> file, an error occurs.
> The problem is that a name of a file to open comes to Nuxeo (WSSFilter) 
> spoiled. Seems that it is being converted from UTF to ISO-8559-1, so each 
> non-latin letter is represented as two symbols. So, Nuxeo cannot recognize 
> the file.
> I've made the simplest possible fix: introduced an additional comparison into 
> loop in SimpleNuxeoBackend.resolveLocation method.
> This loop iterates through documents and tries to match a document's file 
> name with a given one. 
> My check compares the file name converted to ISO-8559-1 as well.
> This approach works well, but probably you can find better fix of this 
> problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to