Edgewall Software
Modify

Opened 5 years ago

Last modified 21 months ago

#10950 new defect

[hg] encoding setting is not used for files in hg

Reported by: soloman@… Owned by:
Priority: normal Milestone: plugin - mercurial
Component: plugin/mercurial Version: 1.0dev
Severity: normal Keywords: file multiple encodings
Cc:
Release Notes:
API 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)

file_encoding.diff (503 bytes ) - added by soloman@… 5 years ago.
encode files from hg according to [hg] encoding setting

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by soloman@…

Attachment: file_encoding.diff added

encode files from hg according to [hg] encoding setting

comment:1 Changed 5 years ago by soloman@…

Milestone: 1.0.1plugin - mercurial

comment:2 Changed 5 years ago by Christian Boos

Well, that to_u won't work here: what about binary files? (e.g. images).

comment:3 in reply to:  2 Changed 5 years ago by soloman@…

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set.
The owner will be changed from (none) to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences .

 
Note: See TracTickets for help on using tickets.