タグ

2017年3月3日のブックマーク (2件)

  • JavaScript における文字コードと「文字数」の数え方 | blog.jxck.io

    Intro textarea などに入力された文字数を、 JS で数えたい場合がある。 ここで .length を数えるだけではダメな理由は、文字コードや JS の内部表現の話を理解する必要がある。 多言語や絵文字対応なども踏まえた上で、どう処理するべきなのか。 それ自体は枯れた話題ではあるが、近年 ECMAScript に追加された機能などを交えて解説する。 なお、文字コードの仕組みを詳解すること自体が目的では無いため、 BOM, UCS-2, Endian, 歴史的経緯など、この手の話題につき物な話の一部は省くこととする。 1 文字とは何か Unicode は全ての文字に ID を振ることを目的としている。 例えば 😭 (loudly crying face) なら 0x1F62D だ。 1 つの文字に 1 つの ID が割り当てられているのだから、文字の数を数える場合は、この ID

    JavaScript における文字コードと「文字数」の数え方 | blog.jxck.io
    Allajah
    Allajah 2017/03/03
    面白かった
  • Summary of the Amazon S3 Service Disruption in the Northern Virginia (US-EAST-1) Region

    We’d like to give you some additional information about the service disruption that occurred in the Northern Virginia (US-EAST-1) Region on the morning of February 28th, 2017. The Amazon Simple Storage Service (S3) team was debugging an issue causing the S3 billing system to progress more slowly than expected. At 9:37AM PST, an authorized S3 team member using an established playbook executed a com

    Summary of the Amazon S3 Service Disruption in the Northern Virginia (US-EAST-1) Region
    Allajah
    Allajah 2017/03/03
    ほんとうにあった怖い話殿堂入りレベルでしょこれ