Edgewall Software
Modify

Opened 16 years ago

Closed 14 years ago

#7851 closed defect (worksforme)

BOM appears in source code listings when using Pygments 1.0

Reported by: jacob@… Owned by:
Priority: low Milestone:
Component: rendering Version: 0.11-stable
Severity: minor Keywords: pygments bom bitesized
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I installed Pygments 1.0 to enable syntax highlighting, and now the BOM (byte-order mark) at the beginning of my UTF-8 source code files is displayed. I realize that one solution is to remove all BOMs from all of the source code, but it would be a better user experience if the BOM could be removed from the content that is passed to Pygments.

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 16 years ago

Keywords: pygments bom added
Milestone: 0.13

comment:2 by Remy Blank, 14 years ago

Keywords: bitesized added

comment:3 by Mark Mc Mahon <mark.mcmahon@…>, 14 years ago

I can't actually reproduce this. I added some files to a test repo (one each with UTF-8, UTF-16, UTF-16BE) when I view these in the browser - I don't see any BOM characters in the syntax highlighted file.

Trac  	   0.13dev-r10019
Docutils   0.7
Genshi     0.7dev-r1134
Pygments   1.3.1

I tried different mime-type settings for the files in SVN (application/octet-stream, text/plain and empty) and still no difference.

comment:4 by Remy Blank, 14 years ago

Milestone: next-major-0.1X
Resolution: worksforme
Status: newclosed

Thanks for testing. So this may have been fixed in pygments directly.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.