[vim/vim] Fix str2blob() ignoring UTF-16/UCS-2/UTF-32 encodings (PR #20466)

1 view
Skip to first unread message

mattn

unread,
12:54 AM (9 hours ago) 12:54 AM
to vim/vim, Subscribed

str2blob() routed every target encoding through convert_string(), which treats all Unicode encodings as utf-8, so the bytes were left unconverted. str2blob(['Hello'], {'encoding': 'utf-16le'}) returned 0z48656C6C6F instead of 0z480065006C006C006F00, breaking the round-trip with blob2str(). Add the same wide-encoding handling blob2str() uses.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20466

Commit Summary

  • 70f26fc Fix str2blob() ignoring UTF-16/UCS-2/UTF-32 encodings

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20466@github.com>

Reply all
Reply to author
Forward
0 new messages