<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>string literal - character code</title>
		<link>http://www.allegro.cc/forums/view/590410</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 07 Mar 2007 13:22:20 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How to insert a character into the string by the characters numeric code?</p><p>this works:
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"%c"</span>,<span class="n">0x81</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
but these dont:
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"\x80"</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"\200"</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"%c"</span>,<span class="s">'\x80'</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
What&#39;s wrong with them? I&#39;m using mingw.</p><p>EDIT: Now I see it works with standard printf, but doesnt with texprintf_ex, because char is signed and the value 0x80 is negative.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (clovekx)</author>
		<pubDate>Tue, 06 Mar 2007 16:59:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are you trying to print the Euro sign? While it&#39;s position in the <a href="http://en.wikipedia.org/wiki/Windows-1252">Windows-1252</a> encoding is 0x80, it&#39;s position in the <a href="http://en.wikipedia.org/wiki/ISO_8859-15">ISO 8859-15</a> is 0xA4.</p><p>As for Allegro&#39;s texprintf_ex(), Allegro uses UTF-8 by default, which means that unless you change the text-encoding format with <tt>set_uformat()</tt>, you must specify character constants in UTF-8 format.</p><p>AE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Andrei Ellman)</author>
		<pubDate>Tue, 06 Mar 2007 21:34:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Little help:</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/set_uformat" target="_blank"><span class="a">set_uformat</span></a><span class="k2">(</span> U_ASCII <span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

Beaten ... I should take less time speaking of hdd&#39;s with HoHo ;-p
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 06 Mar 2007 22:14:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks. Setting uformat works.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (clovekx)</author>
		<pubDate>Tue, 06 Mar 2007 23:34:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Always does.<br />You could also use a text editor that supports UTF-8 (scite for example does), but I that&#39;d be hackish, and generally unreadable on a non-utf8-editor. It is very useful when working with XML, though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Wed, 07 Mar 2007 13:22:20 +0000</pubDate>
	</item>
</rss>
