<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Clipboard access from shell (utf-8)</title>
	<atom:link href="http://sigpipe.macromates.com/2005/10/11/clipboard-access-from-shell-utf-8/feed/" rel="self" type="application/rss+xml" />
	<link>http://sigpipe.macromates.com/2005/10/11/clipboard-access-from-shell-utf-8/</link>
	<description>Programming and using OS X</description>
	<lastBuildDate>Mon, 15 Mar 2010 23:15:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Command-line Tools for the Clipboard - George V. Reilly's Technical Blog</title>
		<link>http://sigpipe.macromates.com/2005/10/11/clipboard-access-from-shell-utf-8/#comment-25614</link>
		<dc:creator>Command-line Tools for the Clipboard - George V. Reilly's Technical Blog</dc:creator>
		<pubDate>Tue, 31 Mar 2009 06:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://macromates.com/sigpipe/archives/2005/10/11/clipboard-access-from-shell-utf-8/#comment-25614</guid>
		<description>&lt;p&gt;[...] mentioned in my post on reStructuredText that I use a little command-line tool, pbcopy, to pipe the output into the clipboard. I finally found a similar tool for Linux, [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] mentioned in my post on reStructuredText that I use a little command-line tool, pbcopy, to pipe the output into the clipboard. I finally found a similar tool for Linux, [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Darick</title>
		<link>http://sigpipe.macromates.com/2005/10/11/clipboard-access-from-shell-utf-8/#comment-25602</link>
		<dc:creator>Darick</dc:creator>
		<pubDate>Wed, 31 Dec 2008 08:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://macromates.com/sigpipe/archives/2005/10/11/clipboard-access-from-shell-utf-8/#comment-25602</guid>
		<description>&lt;p&gt;I spent hours trying to figure out why this wouldn&#039;t work. Thanks for your help.
I was able to put the export __CF_USER_TEXT_ENCODING command inside an applescript &quot;do shell script&quot; command and fix all my problems.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I spent hours trying to figure out why this wouldn&#039;t work. Thanks for your help.
I was able to put the export __CF_USER_TEXT_ENCODING command inside an applescript &#034;do shell script&#034; command and fix all my problems.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Carl Johnson</title>
		<link>http://sigpipe.macromates.com/2005/10/11/clipboard-access-from-shell-utf-8/#comment-1365</link>
		<dc:creator>Carl Johnson</dc:creator>
		<pubDate>Mon, 28 Aug 2006 03:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://macromates.com/sigpipe/archives/2005/10/11/clipboard-access-from-shell-utf-8/#comment-1365</guid>
		<description>&lt;p&gt;I found that pbpaste was giving me Shift-JIS, so I just resorted to dumping it into a file and iconv, but your program is way handier. Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I found that pbpaste was giving me Shift-JIS, so I just resorted to dumping it into a file and iconv, but your program is way handier. Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Allan Odgaard</title>
		<link>http://sigpipe.macromates.com/2005/10/11/clipboard-access-from-shell-utf-8/#comment-116</link>
		<dc:creator>Allan Odgaard</dc:creator>
		<pubDate>Wed, 12 Oct 2005 13:52:53 +0000</pubDate>
		<guid isPermaLink="false">http://macromates.com/sigpipe/archives/2005/10/11/clipboard-access-from-shell-utf-8/#comment-116</guid>
		<description>&lt;p&gt;Maybe I spoke to soon.&lt;/p&gt;

&lt;p&gt;Seems that when the encoding is set, an exception is thrown from setValue:forKey:.&lt;/p&gt;

&lt;p&gt;Here&#039;s a &lt;a href=&quot;http://paste.textmate.org/79&quot;&gt;simple example&lt;/a&gt;. Compile and run from shell (with encoding set) and I get:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;2005-10-12 15:48:25.730 a.out[5733] *** Uncaught exception: &lt;NSCharacterConversionException&gt; Conversion to cString failed for string &quot;test&quot;&lt;/code&gt;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>Maybe I spoke to soon.</p>

<p>Seems that when the encoding is set, an exception is thrown from setValue:forKey:.</p>

<p>Here&#039;s a <a href="http://paste.textmate.org/79">simple example</a>. Compile and run from shell (with encoding set) and I get:</p>

<pre><code>2005-10-12 15:48:25.730 a.out[5733] *** Uncaught exception: <nscharacterconversionexception> Conversion to cString failed for string "test"</nscharacterconversionexception></code></pre>]]></content:encoded>
	</item>
	<item>
		<title>By: Allan Odgaard</title>
		<link>http://sigpipe.macromates.com/2005/10/11/clipboard-access-from-shell-utf-8/#comment-115</link>
		<dc:creator>Allan Odgaard</dc:creator>
		<pubDate>Wed, 12 Oct 2005 13:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://macromates.com/sigpipe/archives/2005/10/11/clipboard-access-from-shell-utf-8/#comment-115</guid>
		<description>&lt;p&gt;Oh, very very nice! Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oh, very very nice! Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Foley</title>
		<link>http://sigpipe.macromates.com/2005/10/11/clipboard-access-from-shell-utf-8/#comment-114</link>
		<dc:creator>Brian Foley</dc:creator>
		<pubDate>Wed, 12 Oct 2005 00:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://macromates.com/sigpipe/archives/2005/10/11/clipboard-access-from-shell-utf-8/#comment-114</guid>
		<description>&lt;p&gt;Assuming your UNIX uid is 501 (hex 1f5), adding the following to your &lt;code&gt;.profile&lt;/code&gt; makes &lt;code&gt;pbcopy&lt;/code&gt; &amp; &lt;code&gt;pbpaste&lt;/code&gt; default to using UTF8.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Make CFString use UTF8 as default encoding
# (Handy for pbcopy/pbpaste which uses defaultCStringEncoding)
export __CF_USER_TEXT_ENCODING=0x1F5:0x8000100:0x8000100
&lt;/code&gt;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>Assuming your UNIX uid is 501 (hex 1f5), adding the following to your <code>.profile</code> makes <code>pbcopy</code> &amp; <code>pbpaste</code> default to using UTF8.</p>

<pre><code># Make CFString use UTF8 as default encoding
# (Handy for pbcopy/pbpaste which uses defaultCStringEncoding)
export __CF_USER_TEXT_ENCODING=0x1F5:0x8000100:0x8000100
</code></pre>]]></content:encoded>
	</item>
</channel>
</rss>
