fix syntax highlighting for cvs diff and multibyte language diff

Review Request #738 — Created Feb. 4, 2009 and discarded

Information

Review Board SVN (deprecated)

Reviewers

There are two change:
1. for cvs diff, filename we got from diff file will be something like  "a.python,v", if we don't strip ",v", then syntax hightliging won't work.
2. tell pygments encoding is "utf-8", otherwise chinese (or other multibyte language) character in source code won't display correctly

 
SB
  1. 
      
  2. for readability, you can write this as:
    
    if filenames.endswith(',v):
    
    
    (should work fine with python2.4 onwards.
    
    1. oops, I meant "filename" not "filenames".
      
  3. 
      
chipx86
  1. This is probably the wrong place to do this.
    
    CVSTool should probably be modifying the stored filenames to not include the ",v". In fact, it looks like this is what it's doing. This would be needed for older files, but newer ones. We should investigate why this isn't working on your install.
  2. 
      
Loading...