Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions doc/builtin.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Feb 17
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Feb 23


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -1377,10 +1377,12 @@ blob2str({blob} [, {options}]) *blob2str()*
encoding このエンコーディングを使用して {blob} 内のバイ
ト列をデコードする。値は |String| である。サ
ポートされている値については |encoding-names|
を参照。
を参照 (および特殊値 "none")
*E1515*
{blob} で無効なバイトシーケンスが検出された場合はエラーが発生
し、空のリストが返される。
現在の 'encoding' が "utf-8" の場合、{blob} で無効なバイトシー
ケンスが検出されるとエラーが発生し、空のリストが返される。この
検証を抑制して無効な可能性のある文字列を取得するには、{options}
の "encoding" を "none" に設定する。

blob が空の場合は空のリストが返される。

Expand Down Expand Up @@ -10429,9 +10431,10 @@ str2blob({list} [, {options}]) *str2blob()*
して文字をバイト列に変換する。

引数 {options} は |Dict| であり、次の項目をサポートする:
encoding このエンコーディングを使用して文字をエンコード
する。値は |String| である。サポートされている
値については|encoding-names| を参照。
encoding Blob を作成する前に、このエンコーディングを使
用して文字を変換する。
値は |String| である。サポートされている値につ
いては |encoding-names| を参照。

文字エンコードが失敗した場合はエラーが発生し、空の blob が返さ
れる。
Expand Down
15 changes: 10 additions & 5 deletions en/builtin.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 17
*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 23


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1309,10 +1309,14 @@ blob2str({blob} [, {options}]) *blob2str()*
items:
encoding Decode the bytes in {blob} using this
encoding. The value is a |String|. See
|encoding-names| for the supported values.
|encoding-names| for the supported values
(plus the special value "none").
*E1515*
An error is given and an empty List is returned if
an invalid byte sequence is encountered in {blob},
When current 'encoding' is "utf-8", an error is given and an
empty List is returned if an invalid byte sequence is
encountered in {blob}. To suppress this validation and get
potentially invalid string, set "encoding" in {options} to
"none".

Returns an empty List if blob is empty.

Expand Down Expand Up @@ -10645,7 +10649,8 @@ str2blob({list} [, {options}]) *str2blob()*

The argument {options} is a |Dict| and supports the following
items:
encoding Encode the characters using this encoding.
encoding Convert the characters using this encoding
before making the Blob.
The value is a |String|. See |encoding-names|
for the supported values.

Expand Down