Vim 9 slightly changed the format.
execute 'set fileencoding=' . e
w
break
- catch /E513: write error, conversion failed/
+ catch /E513: [Ww]rite error, conversion failed/
continue
endtry
endfor
if &modified
- throw '"' . expand('%') . '" E513: write error, conversion failed; tried ' . join(encodings, ',')
+ throw '"' . expand('%') . '" E513: Write error, conversion failed; tried ' . join(encodings, ',')
elseif has("spell")
call SetupSpell()
endif