<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>basyura</author_name>
  <author_url>https://blog.hatena.ne.jp/basyura/</author_url>
  <blog_title>basyura's blog</blog_title>
  <blog_url>https://blog.basyura.org/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>Unicode のコードポイントを指定して文字を得たり、逆にある文字のコードポイントを調べたり、ということをする機会は結構多いと思います。 が、Ruby でそれをやる方法をぐぐってもあまり上位に情報が出てこないなー、と思ったので簡単にまとめておきます。 Ruby にて文字と Unicode コードポイントの相互変換を行う 自分メモ p &quot;文&quot;.unpack(&quot;U*&quot;)[0] #=&gt; 25991 p [25991].pack(&quot;U*&quot;) #=&gt; &quot;文&quot; p 25991.to_s(16) #=&gt; &quot;6587&quot; p 25991.chr(&quot;UTF-8&quot;) #=&gt; &quot;文&quot; p &quot;\u6587&quot; #=&gt; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.basyura.org%2Fentry%2F20110621%2Fp1&quot; title=&quot; コードポイントなにがし - basyura&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-06-21 00:00:00</published>
  <title> コードポイントなにがし</title>
  <type>rich</type>
  <url>https://blog.basyura.org/entry/20110621/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
