Ticket #7405 (closed enhancement: wontfix)
Opened 4 years ago
Last modified 3 years ago
need a charset solution based on directory
| Reported by: | lennie | Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | |
| Component: | version control/browser | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
This is a feature request.
I have a project,but one module's charset is UTF-8,and another modules' charset is GBK。
but in trac.ini,I only can set a default charset setting, if I set charset as UTF-8,then all GBK source code will not display correctly,all non-ascii code are garbages。
If charset can based on directory,then all problem resolved.
such as:
[trac]
default_charset = UTF-8
[trac : foo/bar]
charset = UTF-8
[trac : foo/blahblah]
charset = GBK
Attachments
Change History
comment:1 follow-up: ↓ 2 Changed 4 years ago by anonymous
comment:2 in reply to: ↑ 1 Changed 4 years ago by lennie
- Priority changed from normal to lowest
Replying to anonymous:
Well, first of all your suggested implementation wouldn't really make much sense. But aside from that, you should just include the correct encoding in the mimetype. Just set your files to text/plain;charset=GBK or whatever.
OK,It's my ignorance,sorry
comment:3 Changed 3 years ago by rblank
- Resolution set to wontfix
- Status changed from new to closed
comment:4 Changed 3 years ago by cboos
Note that we'll eventually need such a solution for Mercurial - see #7160.



Well, first of all your suggested implementation wouldn't really make much sense. But aside from that, you should just include the correct encoding in the mimetype. Just set your files to text/plain;charset=GBK or whatever.