Skip to content

TextDecoder and TextEncoder #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 16, 2022

Conversation

Purusah
Copy link
Contributor

@Purusah Purusah commented Jan 12, 2022

No description provided.

@@ -1,30 +1,30 @@
# TextDecoder and TextEncoder
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# TextDecoder and TextEncoder
# TextDecoder та TextEncoder

- **`options`** -- optional object:
- **`fatal`** -- boolean, if `true` then throw an exception for invalid (non-decodable) characters, otherwise (default) replace them with character `\uFFFD`.
- **`ignoreBOM`** -- boolean, if `true` then ignore BOM (an optional byte-order Unicode mark), rarely needed.
- **`label`** -- кодування, типово `utf-8`, але `big5`, `windows-1251` та багато інших наборів теж підтримується.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **`label`** -- кодування, типово `utf-8`, але `big5`, `windows-1251` та багато інших наборів теж підтримується.
- **`label`** -- кодування, типово `utf-8`, але також підтримуються `big5`, `windows-1251` та багато інших кодувань.

- **`fatal`** -- boolean, if `true` then throw an exception for invalid (non-decodable) characters, otherwise (default) replace them with character `\uFFFD`.
- **`ignoreBOM`** -- boolean, if `true` then ignore BOM (an optional byte-order Unicode mark), rarely needed.
- **`label`** -- кодування, типово `utf-8`, але `big5`, `windows-1251` та багато інших наборів теж підтримується.
- **`options`** -- необов’язковий об’єкт:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **`options`** -- необов’язковий об’єкт:
- **`options`** -- необов’язковий об’єкт, який задає додаткові налаштування декодера:

- **`ignoreBOM`** -- boolean, if `true` then ignore BOM (an optional byte-order Unicode mark), rarely needed.
- **`label`** -- кодування, типово `utf-8`, але `big5`, `windows-1251` та багато інших наборів теж підтримується.
- **`options`** -- необов’язковий об’єкт:
- **`fatal`** -- булевий параметр, якщо передано `true` -- буде згенеровано виключення для символів, що не можуть бути декодованими, в іншому випадку (типово) символи будуть замінені на `\uFFFD`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **`fatal`** -- булевий параметр, якщо передано `true` -- буде згенеровано виключення для символів, що не можуть бути декодованими, в іншому випадку (типово) символи будуть замінені на `\uFFFD`.
- **`fatal`** -- булевий параметр, якщо передано `true` -- буде згенеровано виключення для символів, які не вдасться декодувати, в іншому випадку (типово) вони будуть замінені на символ `\uFFFD`.

- **`label`** -- кодування, типово `utf-8`, але `big5`, `windows-1251` та багато інших наборів теж підтримується.
- **`options`** -- необов’язковий об’єкт:
- **`fatal`** -- булевий параметр, якщо передано `true` -- буде згенеровано виключення для символів, що не можуть бути декодованими, в іншому випадку (типово) символи будуть замінені на `\uFFFD`.
- **`ignoreBOM`** -- булевий параметр, якщо передано `true` -- буде проігноровано BOM (необов’язковий маркер порядку байтів), рідко трапляється в нагоді.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **`ignoreBOM`** -- булевий параметр, якщо передано `true` -- буде проігноровано BOM (необов’язковий маркер порядку байтів), рідко трапляється в нагоді.
- **`ignoreBOM`** -- булевий параметр, якщо передано `true` -- буде проігноровано BOM (Byte order mark — необов’язковий маркер порядку байтів), рідко трапляється в нагоді.

@@ -39,34 +39,34 @@ let uint8Array = new Uint8Array([228, 189, 160, 229, 165, 189]);
alert( new TextDecoder().decode(uint8Array) ); // 你好
```

We can decode a part of the buffer by creating a subarray view for it:
Також дозволено декодувати буферу частково за допомогою створення представлення тільки з частиною масиву:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Також дозволено декодувати буферу частково за допомогою створення представлення тільки з частиною масиву:
Також можливо частково декодувати буфер за допомогою створення представлення тільки з частиною масиву:

@javascript-translate-bot
Copy link
Contributor

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@Purusah
Copy link
Contributor Author

Purusah commented Jan 15, 2022

/done

@tarasyyyk tarasyyyk merged commit 1454313 into javascript-tutorial:master Jan 16, 2022
@javascript-translate-bot
Copy link
Contributor

Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉

malechaneit pushed a commit to malechaneit/uk.javascript.info that referenced this pull request Feb 2, 2022
MykolaSopiha added a commit that referenced this pull request Feb 17, 2022
* Modifying document. Article and tasks

* TextDecoder and TextEncoder (#256)

* Update article.md

ms - official international name for millisecond. 1 ms = 1 * 10**(-3) second (or 1e-3). Source : https://en.wikipedia.org/wiki/Metric_prefix .
0.000001 or 1e-6 - it's microsecond. Better name for this variable 'mcs' or 'us'. 'mcs' easier to understand.

* Promises chaining (#259)

* Basic DOM Node Properties (#260)

* Event delegation (#262)

* Reorder contributors arrording translated articles

* Remove contributor

* docs: add OlhaBrozhenets as a contributor for translation (#263)

* Browser default actions (#264)

* Attributes and properties (#265)

* Translate chapter title

* Chapter 'Data Types': translate title and description

* Chapter 'Adnavced functions': translate title and description

* Translate chapter title and description

* Translate chapter 'Prototypes, inheritance'

* Translate chapter 'Classes'

* Translate chapter 'Error handling'

* Translate chapter 'Modules'

* Translate chapter 'Miscellaneous'

* Update index.md

* Translate headers

* Update article.md

* Dispatching custom events (#268)

* Переклад заголовків другої частини підручника (#269)

* devtools fix (#275)

* fix itnro (#271)

* fix manual specifications (#276)

* docs: add Mouu9 as a contributor for bug (#277)

* first steps little fix (#278)

* Update TRANSLATION.md

* Update README.md

* Review 'Data Types' (#284)

* Review 'Variables' (#283)

* Review 'Structure' (#282)

* Article 'Hello World': Fix button name (#280)

* Window sizes and scrolling (#279)

* docs: add jeneg as a contributor for translation (#285)

* Blob (#270)

* Scripts: async, defer (#273)

* Mouse events (#274)

* Fix: Scripts: async, defer (#289)

* fix 06-alert-prompt-confirm (#286)

* 07-type-conversions fix

* Adds pointer events

* Adds pointer events edits

* Adds pointer events edits

* Update 2-ui/1-document/07-modifying-document/4-clear-elem/solution.md

* Update 2-ui/1-document/07-modifying-document/4-clear-elem/task.md

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html

* Update 2-ui/1-document/07-modifying-document/6-create-list/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html

* Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/source.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md

* Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.md

* Update 2-ui/1-document/07-modifying-document/9-calendar-table/source.view/index.html

* Update images.yml

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md

* Update 2-ui/1-document/07-modifying-document/12-sort-table/solution.md

* Update 2-ui/1-document/07-modifying-document/12-sort-table/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/12-sort-table/source.view/index.html

* Update 2-ui/1-document/07-modifying-document/12-sort-table/task.md

* Update 2-ui/1-document/07-modifying-document/4-clear-elem/solution.md

* Update 2-ui/1-document/07-modifying-document/6-create-list/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/build-tree-dom.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/solution.md

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/task.md

* Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/2-events/03-event-delegation/3-sortable-table/source.view/index.html

* Update 2-ui/2-events/03-event-delegation/3-sortable-table/task.md

* Update 2-ui/2-events/03-event-delegation/3-sortable-table/source.view/index.html

* Update 2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md

* Update 2-ui/1-document/07-modifying-document/5-why-aaa/task.md

* Update 1-js/02-first-steps/04-variables/article.md

* Update 1-js/02-first-steps/04-variables/article.md

* Update 1-js/01-getting-started/4-devtools/article.md

* Update 1-js/02-first-steps/02-structure/article.md

* Update 1-js/02-first-steps/04-variables/article.md

* Update 1-js/02-first-steps/06-alert-prompt-confirm/article.md

* Update 1-js/02-first-steps/07-type-conversions/article.md

* Update 1-js/02-first-steps/07-type-conversions/article.md

* Update 1-js/02-first-steps/07-type-conversions/article.md

* Update 1-js/02-first-steps/07-type-conversions/article.md

* Update 1-js/11-async/03-promise-chaining/article.md

* Update 2-ui/1-document/05-basic-dom-node-properties/4-where-document-in-hierarchy/solution.md

* Update 2-ui/1-document/05-basic-dom-node-properties/article.md

* Update 2-ui/1-document/05-basic-dom-node-properties/article.md

* Update 2-ui/1-document/10-size-and-scroll-window/article.md

* Update 1-js/11-async/03-promise-chaining/article.md

* Update 1-js/11-async/03-promise-chaining/article.md

* Update 2-ui/1-document/05-basic-dom-node-properties/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/2-events/05-dispatch-events/article.md

* Update 2-ui/2-events/05-dispatch-events/article.md

* Update 2-ui/3-event-details/1-mouse-events-basics/article.md

* Update 2-ui/3-event-details/1-mouse-events-basics/article.md

* Update 2-ui/2-events/05-dispatch-events/article.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/1-document/10-size-and-scroll-window/article.md

* Update 2-ui/1-document/10-size-and-scroll-window/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/2-events/03-event-delegation/4-behavior-tooltip/task.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/2-events/03-event-delegation/article.md

* Update 2-ui/2-events/05-dispatch-events/article.md

* Update 2-ui/1-document/05-basic-dom-node-properties/article.md

* Update 2-ui/1-document/05-basic-dom-node-properties/4-where-document-in-hierarchy/solution.md

* Update 2-ui/1-document/05-basic-dom-node-properties/article.md

* Update 2-ui/1-document/05-basic-dom-node-properties/article.md

* Update 2-ui/1-document/05-basic-dom-node-properties/article.md

* Update 2-ui/1-document/06-dom-attributes-and-properties/article.md

* Update 2-ui/1-document/06-dom-attributes-and-properties/article.md

* Update 2-ui/1-document/06-dom-attributes-and-properties/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md

* Update 4-binary/03-blob/article.md

* Update 4-binary/03-blob/article.md

* Update 2-ui/5-loading/02-script-async-defer/article.md

* Update 2-ui/1-document/05-basic-dom-node-properties/2-tree-info/source.view/index.html

* Update 2-ui/1-document/05-basic-dom-node-properties/2-tree-info/source.view/index.html

* Update 2-ui/1-document/05-basic-dom-node-properties/2-tree-info/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/7-create-object-tree/innerhtml.view/index.html

* Update 4-binary/03-blob/article.md

* Update 2-ui/1-document/07-modifying-document/6-create-list/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html

* Update 2-ui/1-document/05-basic-dom-node-properties/2-tree-info/source.view/index.html

* Update 2-ui/2-events/03-event-delegation/3-sortable-table/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html

* Update 2-ui/1-document/07-modifying-document/9-calendar-table/solution.view/index.html

* Update 1-js/11-async/03-promise-chaining/article.md

* Update 2-ui/1-document/07-modifying-document/4-clear-elem/solution.md

* Update 2-ui/1-document/05-basic-dom-node-properties/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 1-js/02-first-steps/02-structure/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/2-events/04-default-browser-action/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

* Update 2-ui/1-document/07-modifying-document/article.md

Co-authored-by: Vladyslav Bohaichuk <bohaichuk.v@gmail.com>
Co-authored-by: NickFallman <93594821+NickFallman@users.noreply.github.com>
Co-authored-by: hordiienko-tatiana <49336627+hordiienko-tatiana@users.noreply.github.com>
Co-authored-by: Mykola Sopiha <sopiha.mv@gmail.com>
Co-authored-by: Olha Brozhenets <olhabrozhenets@gmail.com>
Co-authored-by: tarasyyyk <oster.ok@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Stanislav <stanislav_dolgachov@epam.com>
Co-authored-by: Mouu9 <97622707+Mouu9@users.noreply.github.com>
Co-authored-by: Yevhenii Chubar <yevhenii.chubar@gmail.com>
Co-authored-by: Vitaly Nesteruk <43732023+Nordtonito@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants