<?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>文字コード</anon>
    <anon>MS-Windows</anon>
    <anon>Haskell</anon>
  </categories>
  <description>タイトルは釣りです。副作用を起こしているのはHaskellから読んでいるCのライブラリです。 Win32 APIのWideCharToMultiByte、MultiByteToWideCharでUTF-16 ⇔ Shift-JIS 変換を行うには変換結果を格納するバッファを確保してそのポインタを引数に渡し、そのバッファに書き込まれた文字列を使用します。つまり、副作用によって結果を受け取っています。 Haskellで副作用が書けるのでしょうか? 普通に副作用が書けます。 ヌルポ(nullPtr)もあって、感心してしまいます。 cstringToBSTR ではcSysAllocStringLenで…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20130422%2F1366632065&quot; title=&quot;Haskellで副作用を起こす(Win32 API によるUTF-16 ⇔ Shift-JIS 変換) - 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>2013-04-22 21:01:05</published>
  <title>Haskellで副作用を起こす(Win32 API によるUTF-16 ⇔ Shift-JIS 変換)</title>
  <type>rich</type>
  <url>https://sirocco.hatenadiary.org/entry/20130422/1366632065</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
