From 01524e272fc6421a0ac6e2f21880bd6d1d5c9e28 Mon Sep 17 00:00:00 2001 From: mattn Date: Tue, 21 Feb 2012 15:34:58 +0900 Subject: [PATCH] useragent. --- autoload/zencoding.vim | 6 +++++- plugin/zencoding.vim | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/autoload/zencoding.vim b/autoload/zencoding.vim index 958b55e..f131dca 100644 --- a/autoload/zencoding.vim +++ b/autoload/zencoding.vim @@ -1,7 +1,7 @@ "============================================================================= " zencoding.vim " Author: Yasuhiro Matsumoto -" Last Change: 14-Feb-2012. +" Last Change: 21-Feb-2012. let s:save_cpo = &cpo set cpo&vim @@ -1194,6 +1194,10 @@ function! s:get_content_from_url(url, utf8) silent! exec '0r!'.g:zencoding_curl_command.' "'.substitute(a:url, '#.*', '', '').'"' endif let ret = join(getline(1, '$'), "\n") + let ic = iconv(ret, "utf-8", &encoding) + if ret != ic + let ret = ic + endif silent! bw! return ret endfunction diff --git a/plugin/zencoding.vim b/plugin/zencoding.vim index 561ee54..f77f5b8 100644 --- a/plugin/zencoding.vim +++ b/plugin/zencoding.vim @@ -1,7 +1,7 @@ "============================================================================= " File: zencoding.vim " Author: Yasuhiro Matsumoto -" Last Change: 02-Feb-2012. +" Last Change: 21-Feb-2012. " Version: 0.59 " WebPage: http://github.com/mattn/zencoding-vim " Description: vim plugins for HTML and CSS hi-speed coding. @@ -79,7 +79,7 @@ if !exists('g:zencoding_debug') endif if !exists('g:zencoding_curl_command') - let g:zencoding_curl_command = 'curl -s -L' + let g:zencoding_curl_command = 'curl -s -L -A Mozilla/5.0' endif if exists('g:use_zen_complete_tag') && g:use_zen_complete_tag