For a buffer containing text "กขค" with UTF-8 encoding:

:perldo s/ข/x/g => "กxค"

but :perldo s/[ข]/x/g => "xx�xxxxx�".

How to specify Perl's encoding?

Note: Currently I have to use %:!perl -C -Mutf8 -pe 's/[ข]/x/g'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.