thanks, it solved.
" vital.vim modified
function! s:__urlencode_char(c, charenc)
let save_encoding = &encoding
let utf = iconv(a:c, &encoding, a:charenc)
if utf == ""
let utf = a:c
endif
let &encoding = a:charenc
let s = ""
for i in range(strlen(utf))
let s .= printf("%%%02X", char2nr(utf[i]))
endfor
let &encoding = save_encoding
return s
endfunction
function! s:escape(str, ...)
let charenc = a:0 > 0 ? a:1 : 'utf-8'
return substitute(a:str, '[^a-zA-Z0-9_.~/-]',
'\=s:__urlencode_char(submatch(0), charenc)', 'g')
endfunction
:let command = 'C:\cygwin-1.7\bin\curl -L -s -k -i
http://vim.g.hatena.ne.jp/keyword/選択されたテキストの取得'
:echo iconv(system(iconv(command, &encoding, 'char')), 'utf-8', &encoding)
:let command = 'C:\cygwin-1.7\bin\curl -L -s -k -i
http://www.getchu.com/php/search.phtml?search_keyword=' . s:escape('田村ゆかり',
'euc-jp')
:echo iconv(system(command), 'euc-jp', &encoding)
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php