基于Octopress搭建的博客,使用rake generate
生成博客的时候会报如下的错误:
## Generating Site with Jekyll identical source/stylesheets/screen.css Configuration from /srv/octopress/_config.yml Building site: source -> public Liquid Exception: incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string) in page /srv/octopress/plugins/category_list_tag.rb:9:in `gsub' /srv/octopress/plugins/category_list_tag.rb:9:in `block in render' /srv/octopress/plugins/category_list_tag.rb:6:in `each' /srv/octopress/plugins/category_list_tag.rb:6:in `render'
参阅了网上的一些说明,是因为utf-8格式格式造成的,所以请问Linux环境下如何将utf-8格式文件转变成无bom的utf-8格式文件?
用 Vim 打开,
:set nobomb :wq
或者用 tail 命令:
tail -c +4 old_file > new_file