From 73b2e32a02a716736a0dd2372a90983de3d7e1e5 Mon Sep 17 00:00:00 2001 From: Konstantin Tchernov Date: Mon, 16 Jan 2023 13:58:03 +1300 Subject: [PATCH 1/2] Use Ukrainian instead of Russian in the example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Привет -> Привіт --- wiki/PyYAMLDocumentation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki/PyYAMLDocumentation.md b/wiki/PyYAMLDocumentation.md index 1d451c2..13d7afa 100644 --- a/wiki/PyYAMLDocumentation.md +++ b/wiki/PyYAMLDocumentation.md @@ -145,10 +145,10 @@ the string/file. If no *BOM* is present, the *utf-8* encoding is assumed. ``` {.python} >>> yaml.load(u""" -... hello: Привет! +... hello: Привіт! ... """) # In Python 3, do not use the 'u' prefix -{'hello': u'\u041f\u0440\u0438\u0432\u0435\u0442!'} +{'hello': u'\u041f\u0440\u0438\u0432\u0456\u0442!'} >>> stream = file('document.yaml', 'r') # 'document.yaml' contains a single YAML document. >>> yaml.load(stream) From 784bc40002aefb7b5c9ea4787df559a6d277c923 Mon Sep 17 00:00:00 2001 From: Konstantin Tchernov Date: Mon, 16 Jan 2023 13:59:58 +1300 Subject: [PATCH 2/2] Use Ukrainian instead of Russian in the example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Привет -> Привіт --- wiki/PyYAMLDocumentation.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki/PyYAMLDocumentation.html b/wiki/PyYAMLDocumentation.html index 1cdf42f..db62251 100644 --- a/wiki/PyYAMLDocumentation.html +++ b/wiki/PyYAMLDocumentation.html @@ -404,10 +404,10 @@

Loading YAML

yaml.load accepts a byte string, a Unicode string, an open binary file object, or an open text file object. A byte string or a file must be encoded with utf-8, utf-16-be or utf-16-le encoding. yaml.load detects the encoding by checking the BOM (byte order mark) sequence at the beginning of the string/file. If no BOM is present, the utf-8 encoding is assumed.

yaml.load returns a Python object.