GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Unicode: flag "u" and class \p{...} by lanachayka · Pull Request #374 · javascript-tutorial/uk.javascript.info Conversation
|
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Дякую, за чудовий переклад! Вибачаюсь, що так довго перевіряв.
Наступного разу все буде набагато швидше =)
Внесіть, будь ласка, зміни про які я написав. Якщо будуть питання, напишіть мені :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| |😄| `0x1f604` | 4 | | ||
|
|
||
| So characters like `a` and `≈` occupy 2 bytes, while codes for `𝒳`, `𝒴` and `😄` are longer, they have 4 bytes. | ||
| Таким чином, такі символи, як `a` і `≈`, займають 2 байти, а коди для `𝒳`, `𝒴` і `😄` довші, в них - 4 байти. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Таким чином, такі символи, як `a` і `≈`, займають 2 байти, а коди для `𝒳`, `𝒴` і `😄` довші, в них - 4 байти. | |
| Таким чином, такі символи, як `a` і `≈`, займають 2 байти, а коди для `𝒳`, `𝒴` і `😄` довші, в них -- 4 байти. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Таким чином, такі символи, як `a` і `≈`, займають 2 байти, а коди для `𝒳`, `𝒴` і `😄` довші, в них - 4 байти. | ||
|
|
||
| Long time ago, when JavaScript language was created, Unicode encoding was simpler: there were no 4-byte characters. So, some language features still handle them incorrectly. | ||
| Коли створювалась мова JavaScript, кодування Юнікод було простіше: 4-байтвоих символів не існувало. Тому досі деякі функції мови все ще обробляють їх неправильно. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Коли створювалась мова JavaScript, кодування Юнікод було простіше: 4-байтвоих символів не існувало. Тому досі деякі функції мови все ще обробляють їх неправильно. | |
| Коли створювалась мова JavaScript, кодування Юнікод було простіше: 4-байтових символів не існувало. Тому досі деякі функції мови все ще обробляють їх неправильно. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| alert('😄'.length); // 2 | ||
| alert('𝒳'.length); // 2 | ||
| ``` | ||
| ...Але ми бачимо, що лише один, правда ж? Річ у тому, що властивість `length` трактує 4 байти, як два символи по 2 байти. Це не правильно, адже їх необхідно розглядати тільки разом (так звана "сурогатна пара", детальніше у розділі <info:string>). |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Перенесіть, будь ласка, цей текст на наступний рядок. У перекладі має бути стільки ж рядків, як і в оригінальній статті. Це необхідно щоб у майбутньому синхронізувати зміни.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ...Але ми бачимо, що лише один, правда ж? Річ у тому, що властивість `length` трактує 4 байти, як два символи по 2 байти. Це не правильно, адже їх необхідно розглядати тільки разом (так звана "сурогатна пара", детальніше у розділі <info:string>). | ||
|
|
||
| ...But we can see that there's only one, right? The point is that `length` treats 4 bytes as two 2-byte characters. That's incorrect, because they must be considered only together (so-called "surrogate pair", you can read about them in the article <info:string>). | ||
| За замовчуванням регулярні вирази також розглядають 4-байтові «довгі символи» як пару 2-байтових. Як і у випадку з рядками, це може призвести до дивних результатів. Ми побачимо це трохи пізніше, у розділі <info:regexp-character-sets-and-ranges>. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| За замовчуванням регулярні вирази також розглядають 4-байтові «довгі символи» як пару 2-байтових. Як і у випадку з рядками, це може призвести до дивних результатів. Ми побачимо це трохи пізніше, у розділі <info:regexp-character-sets-and-ranges>. | |
| За замовчуванням регулярні вирази також розглядають 4-байтові "довгі символи" як пару 2-байтових. Як і у випадку з рядками, це може призвести до дивних результатів. Ми побачимо це трохи пізніше, у розділі <info:regexp-character-sets-and-ranges>. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ## Властивості Юнікоду \p{...} | ||
|
|
||
| ## Unicode properties \p{...} | ||
| Кожен символ в кодуванні Юнікод має багато властивостей. Вони описують, до якої «категорії» належить символ та містять різну інформацію про нього. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Кожен символ в кодуванні Юнікод має багато властивостей. Вони описують, до якої «категорії» належить символ та містять різну інформацію про нього. | |
| Кожен символ в кодуванні Юнікод має багато властивостей. Вони описують, до якої "категорії" належить символ та містять різну інформацію про нього. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - `Hex_Digit` містить шістнадцяткові числа: `0-9`, `a-f`. | ||
| - ...І так далі. | ||
|
|
||
| Юнікод підтримує велику кількість властивостей, і їхній повний перелік потребував би дуже багато місця, тому ось посилання. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Юнікод підтримує велику кількість властивостей, і їхній повний перелік потребував би дуже багато місця, тому ось посилання. | |
| Юнікод підтримує велику кількість властивостей, і їхній повний перелік вимагав би дуже багато місця, тому ось посилання: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Пошукаймо китайські ієрогліфи. | ||
|
|
||
| There's a Unicode property `Script` (a writing system), that may have a value: `Cyrillic`, `Greek`, `Arabic`, `Han` (Chinese) and so on, [here's the full list](https://en.wikipedia.org/wiki/Script_(Unicode)). | ||
| Нам допоможе властивість Юнікоду - `Script` (система письма), яка може мати значення: `Cyrillic`(Кирилиця), `Greek` (Грецька), `Arabic` (Арабська), `Han` (Китайська) та інші, [тут повний перелік](https://en.wikipedia.org/wiki/Script_(Unicode)). |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Нам допоможе властивість Юнікоду - `Script` (система письма), яка може мати значення: `Cyrillic`(Кирилиця), `Greek` (Грецька), `Arabic` (Арабська), `Han` (Китайська) та інші, [тут повний перелік](https://en.wikipedia.org/wiki/Script_(Unicode)). | |
| Нам допоможе властивість Юнікоду -- `Script` (система письма), яка може мати значення: `Cyrillic`(Кирилиця), `Greek` (Грецька), `Arabic` (Арабська), `Han` (Китайська) та інші, [тут повний перелік](https://en.wikipedia.org/wiki/Script_(Unicode)). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - не призначенні `Cn`, | ||
| - для приватного користування `Co`, | ||
| - сурогат `Cs`. | ||
|
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Додайте тут, будь ласка, пустий рядок як було в оригінальній статті. Це потрібно знову ж таки для сумісності з англійським варіантом.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please make the requested changes. After it, add a comment "/done". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
/done |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@all-contributors please add @lanachayka for translate |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@stas-dolgachov I couldn't determine any contributions to add, did you specify any contributions? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
https://github.com/all-contributors please add @lanachayka for translate |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
https://github.com/all-contributors please add @lanachayka for translation |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@all-contributors please add @lanachayka for translation |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@stas-dolgachov I've put up a pull request to add @lanachayka! 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.