<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sirocco</author_name>
  <author_url>https://blog.hatena.ne.jp/sirocco/</author_url>
  <blog_title>sirocco の書いてもすぐに忘れるメモ</blog_title>
  <blog_url>https://sirocco.hatenadiary.org/</blog_url>
  <categories>
    <anon>PostScript</anon>
  </categories>
  <description>先の「文字列が枠内におさまるように自動改行しながら印刷する(PostScript)」はEUC-JPバージョンでした。これを Shift-JIS で行うには1文字と残りの文字列に分けるための判定方法を変更する必要があります。 Shift-JISの半角文字は0x80〜0x9F、0xE0〜0xFF を使わないようになっています。この範囲の値のバイトに合えば全角文字ですから2バイト文字と判断して次のバイトと組み合わせて1文字とする必要があります。 %!PS-Adobe-3.0 % 漢字 (2byte) :上位1バイト 0x81〜0x9f、 0xe0〜0xef /isKANJI { dup is0x81…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20120902%2F1346555384&quot; title=&quot;PostScript でShift-JISの1バイト文字、2バイト文字判定 - sirocco の書いてもすぐに忘れるメモ&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>2012-09-02 12:09:44</published>
  <title>PostScript でShift-JISの1バイト文字、2バイト文字判定</title>
  <type>rich</type>
  <url>https://sirocco.hatenadiary.org/entry/20120902/1346555384</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
