1. Sebastian Sebastian
  2. scm-manager
  3. Issues

Issues

Issue #167 resolved

Problem with russian file names

igor_kostromin
created an issue

"Commits, Source" links dont work properly.

{{{

!text

17:58:31.095 [qtp1500894891-20] ERROR sonia.scm.repository.AbstractHgHandler - could not parse result javax.xml.bind.UnmarshalException: null at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:218) ~[jaxb-impl-2.2.3.jar:2.2.3] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:189) ~[jaxb-impl-2.2.3.jar:2.2.3] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157) ~[na:1.6.0_18] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:204) ~[na:1.6.0_18] at sonia.scm.repository.AbstractHgHandler.getResultFromScript(AbstractHgHandler.java:358) [scm-hg-plugin-1.15.jar:na] }}}

Comments (21)

  1. igor_kostromin reporter

    Yes, no errors now, but in browser the file names is displayed incorrectly:

    <a>ðóññêèé ôàéë.txt</a>

    instead

    <a>русский файл.txt</a>

    And content of file is displayed as file is empty, but it isn't actually.

  2. igor_kostromin reporter

    Ow, I see. System encoding is Win-1251, and files got this encoding too, possibly.. If hg stores it in original encoding, there are no error in current behaviour (except empty file, ofc).

  3. Sebastian Sebastian repo owner

    In the last days i've tried very hard to resolve this issue. I have massive problems during the exchange between the python module and the webapp. I have a termin next week with a colleague of me which is a kind of python encoding expert. I hope that he can help. Python is not my strength.

  4. igor_kostromin reporter
    In the last days i've tried very hard to resolve this issue. I have massive problems during the exchange between the python module and the webapp. I have a termin next week with a colleague of me which is a kind of python encoding expert. I hope that he can help. Python is not my strength.
    

    Yep, such problems with encoding are often confusing for me too, exceptionally when trying to work with various systems simultaneously :) Thank you for your insistence.

    Could you please test the version below:
    
    http://download.scm-manager.org/issues/167/scm-server-app-2012060801.zip
    

    Yes, it works, but only after full application restart.

  5. Sebastian Sebastian repo owner

    You can use this version. This version based on 1.16 and contains only the patches for this issue. Could you test commit view, blame view and file browser with russian commit messages?

  6. igor_kostromin reporter

    Blame doesn't work (returns status 500)

    scm-server.out log:

    21:55:06.856 [Thread-48] ERROR sonia.scm.repository.AbstractHgHandler - Traceback (most recent call last):
      File "/home/freddie/scm-home/lib/python/blame.py", line 63, in <module>
        appendBlameLines(doc, repo, revision, path)
      File "/home/freddie/scm-home/lib/python/blame.py", line 49, in appendBlameLines
        linesCtx = repo[revision][path].annotate()
      File "/home/freddie/lib64/python/mercurial/context.py", line 157, in __getitem__
        return self.filectx(key)
      File "/home/freddie/lib64/python/mercurial/context.py", line 260, in filectx
        fileid = self.filenode(path)
      File "/home/freddie/lib64/python/mercurial/context.py", line 249, in filenode
        return self._fileinfo(path)[0]
      File "/home/freddie/lib64/python/mercurial/context.py", line 244, in _fileinfo
        _('not found in manifest'))
    mercurial.error.LookupError: я─я┐я│я│п╨п╦п╧ я└п╟п╧п╩.txt@dcbfd440be5e: not found in manifest
    21:55:06.947 [qtp44937684-18] ERROR sonia.scm.repository.AbstractHgHandler - could not parse result
    javax.xml.bind.UnmarshalException: null
            at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335) ~[na:1.6.0_18]
            at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:523) ~[jaxb-impl-2.2.3.jar:2.2.3]
            at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmarsh
    

    Commit messages, commit view work properly (but in diff there are ????? - but it is because Windows-1251 encoding used in file names, so.. I don't know if this ok or not. Mb need some option to display diffs in custom encoding.)

  7. igor_kostromin reporter

    In blame mode there is UTF-8 encoding is displayed as ANSI (windows-1251) (the second row in "русский файл.txt" file), in Default mode all is fine.

  8. Log in to comment