Opened 12 years ago
Last modified 9 years ago
#10950 new defect
[hg] encoding setting is not used for files in hg
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | plugin - mercurial |
Component: | plugin/mercurial | Version: | 1.0dev |
Severity: | normal | Keywords: | file multiple encodings |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
We have some files in UTF-8 and some files in cp1251 in our mercurial repository.
[hg] encoding = utf-8, cp1251
With this setting committer, commit message, etc are displayed correct in trac's source browser. Files in UTF-8 are also displayed correct, but not files in cp1251.
Attached patch adds encoding conversion for file content according to [hg] encoding setting.
Attachments (1)
Change History (4)
by , 12 years ago
Attachment: | file_encoding.diff added |
---|
comment:1 by , 12 years ago
Milestone: | 1.0.1 → plugin - mercurial |
---|
follow-up: 3 comment:2 by , 12 years ago
Well, that to_u
won't work here: what about binary files? (e.g. images).
comment:3 by , 12 years ago
Replying to cboos:
Well, that
to_u
won't work here: what about binary files? (e.g. images).
Added an .xls sheet and .png image. Both are not recognized by trac file viewer as text files and no error occurs.
encode files from hg according to [hg] encoding setting