Edgewall Software
Modify

Ticket #7851 (closed defect: worksforme)

Opened 3 years ago

Last modified 18 months ago

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:
Release Notes:
API 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

Change History

comment:1 Changed 3 years ago by cboos

  • Keywords pygments bom added
  • Milestone set to 0.13

comment:2 Changed 20 months ago by rblank

  • Keywords bitesized added

comment:3 Changed 18 months ago by Mark Mc Mahon <mark.mcmahon@…>

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 Changed 18 months ago by rblank

  • Milestone next-major-0.1X deleted
  • Resolution set to worksforme
  • Status changed from new to closed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from (none). Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.