<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>crmprogrammer38</author_name>
  <author_url>https://blog.hatena.ne.jp/crmprogrammer38/</author_url>
  <blog_title>プログラマ３８の日記</blog_title>
  <blog_url>https://crmprogrammer38.hatenablog.com/</blog_url>
  <categories>
    <anon>Salesforce</anon>
  </categories>
  <description>SalesforceのApexプログラムの中で、Shift_JISのCSVファイルを作成したい時があります。 Salesforceの文字列とバイナリは、StringとBlobを使います。BlobからStringとその逆の変換の関数は用意されていますが、その際のエンコーディングはUTF-8となります。 そこで、エンコーディングをShiftJISにするために工夫が必要になりますが、次の2点のやり方を考えました。 CSV出力するVisualforceを作成し、PageReference.getContent()を使う EncodingUtil.urlEncodeとEncodingUtil.conve…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcrmprogrammer38.hatenablog.com%2Fentry%2F2017%2F09%2F01%2F123000&quot; title=&quot;Salesforce: Shift_JISのテキストファイルを作成して添付ファイルに登録する - プログラマ３８の日記&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>2017-09-01 12:30:00</published>
  <title>Salesforce: Shift_JISのテキストファイルを作成して添付ファイルに登録する</title>
  <type>rich</type>
  <url>https://crmprogrammer38.hatenablog.com/entry/2017/09/01/123000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
