Defect #11834
Bazaar: "???" instead of non ASCII character in paths on non UTF-8 locale
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | SCM | |||
Target version: | 2.2.0 | |||
Resolution: | Fixed | Affected version: |
Description
- Redmine 2.0.3
- Ruby 1.8.7
- Rails 3.2.6
- Apache 2.2
I'm using Redmine on Windows XP SP3 Rus and Windows Server 2003 Rus (cp1251). There is a problem with browsing Bazaar repository containing cyrillic symbols in repository filenames and paths. I see ??? instead of cyrillic symbols.
I didn't find solution of this problem anywhere. Is there one?
So, I checked other scm *_adapter.rb and made same 'bzr' output encoding convertion, so everything works now (see attached files, they contains comments of basic changes). Was it useless?
Changes:- Added path encoding setup when adding Bazaar repo (same as for the filesystem).
- Removed log encoding setup, because of Bazaar is storing all comments in utf8 inside and outputs them with same encoding as for the path.
P.S. Saw Ruby for the first time when started to do this
Associated revisions
scm: bazaar: update test repository (#11834)
Add new "non_ascii" branch.
It was created by "bzr branch --no-tree branch00 non_ascii".
It is equivalent to Git bare repository and Mercurial "hg update null".
It has non ASCII path name files and directory.
scm: bazaar: add @path_encoding instance value and set it UTF-8 at adapter initialize method (#11834)
scm: bazaar: convert command line character encoding to @path_encoding (#11834)
scm: bazaar: convert path encoding from @path_encoding to UTF-8 at adapter revisions method (#11834)
scm: bazaar: convert path encoding from @path_encoding to UTF-8 at adapter entries method (#11834)
scm: bazaar: use log encoding as path encoding (#11834)
scm: bazaar: add non ASCII path test to unit model test (#11834)
scm: bazaar: do not call super initialize method at adapter (#11834)
On Bazaar 2.0.5, in case of using non ASCII repository path,
following trace raise on all operation.
Traceback (most recent call last): File "/usr/bin/bzr", line 142, in <module> exit_val = bzrlib.commands.main() File "/usr/lib/python2.6/site-packages/bzrlib/commands.py", line 1102, in main argv = osutils.get_unicode_argv() File "/usr/lib/python2.6/site-packages/bzrlib/osutils.py", line 90, in get_unicode_argv "encoding." % a)) bzrlib.errors.BzrError: Parameter ''/somewhere/\xe3\x83\x90\xe3\x82\xb6\xe3\x83\xbc/non_ascii/'' is unsupported by the current encoding.
scm: bazaar: add more comment to non ASCII path tests at unit model test (#11834)
History
#1
Updated by Alexander Usenko over 8 years ago
There can be a problem with file annotation view (simple file view is Ok). "Attachments and repositories encodings" in application settings must be set to "UTF-8, CP1251", not to "CP1251, UTF-8". Last case causes file to look like it is encoded in UTF-8, but is browsed in CP1251.
What is being seen: тест тест тест
What should be seen: тест тест тест
Maybe i forgot smth in annotate function of bazaar_adapter.rb
#2
Updated by Bruno Souza over 8 years ago
I dont know
#3
Updated by Toshi MARUYAMA over 8 years ago
- Status changed from New to 7
- Assignee set to Toshi MARUYAMA
- Affected version (unused) deleted (
2.0.3) - Affected version deleted (
2.0.3)
#4
Updated by Toshi MARUYAMA over 8 years ago
- Subject changed from Redmine+Bazaar+Windows: "???" instead of cyrillic symbols in repository paths to Bazaar+Windows: "???" instead of non ASCII character in paths
#5
Updated by Toshi MARUYAMA over 8 years ago
- Subject changed from Bazaar+Windows: "???" instead of non ASCII character in paths to Bazaar: "???" instead of non ASCII character in paths on non UTF-8 locale
#6
Updated by Toshi MARUYAMA over 8 years ago
- Target version set to 2.2.0
- % Done changed from 0 to 100
#7
Updated by Jean-Philippe Lang over 8 years ago
- Status changed from 7 to Closed
- Resolution set to Fixed