<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ISBN | ウダ2Blog</title>
	<atom:link href="https://uda2.com/blog/tag/isbn/feed/" rel="self" type="application/rss+xml" />
	<link>https://uda2.com/blog</link>
	<description>大阪でフリーランスとしてWEB制作している管理人が気になった技術をメモったり、作ったツールの紹介などを綴っているブログです。</description>
	<lastBuildDate>Sat, 21 Jun 2008 17:19:33 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>ISBN変換</title>
		<link>https://uda2.com/blog/isbn/</link>
					<comments>https://uda2.com/blog/isbn/#respond</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Sat, 21 Jun 2008 17:19:33 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[ISBN]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://uda2.com/wordpress/2008/06/isbn.html</guid>

					<description><![CDATA[<p>やらなきゃいけない事は他にもいろいろあるのにまたツールを作った。 以前からAmazonで言うところのISBN-13のハイフンの打つタイミングがよく分からないので調べてみたら桁数は違うけど規則性がある事を発見した。 例えば</p>
The post <a href="https://uda2.com/blog/isbn/">ISBN変換</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>やらなきゃいけない事は他にもいろいろあるのにまたツールを作った。<br />
以前からAmazonで言うところのISBN-13のハイフンの打つタイミングがよく分からないので調べてみたら桁数は違うけど規則性がある事を発見した。<br />
例えば、978-4088745213だと正式には978-4-08-874521-3になる。<br />
<a href="http://ja.wikipedia.org/wiki/ISBN" target="_blank">wikipedia</a>風に言うと「接頭記号」-「グループ記号」-「出版者記号」-「書名記号」-「チェックデジット」となる。「接頭記号」と「グループ記号」と「チェックデジット」は桁数が決まってるので問題無いが「出版者記号」「書名記号」は桁数が決まっていない、そこで<a href="http://www.booklog.net/isbn/" target="_blank">ISBN 出版社リスト</a>を見ていると「出版者記号」の頭の2桁を見ると桁数が分かる事を発見した。<br />
PHPで書くと下記の様な感じだ（$aに「出版者記号」の頭の2桁が代入されてるとする）<br />
if ($a < 25) $keta = 2;
else if ($a < 75) $keta = 3;
else if ($a < 86) $keta = 4;
else if ($a < 90) $keta = 5;
else if ($a < 99) $keta = 6;
else $keta = 7;
更に調べてみるとISBN-10とISBN-13は現在のところ変換可能という事が分かった。
ISBN-13とISBNの大きな違いは「接頭記号」が付くかどうかで、「接頭記号」には978と979があるという事でISBN-10からISBN-13への変換は無理と思いこんでいたんだけど実際は979は使われていないみたい。そうなると978付けて「チェックデジット」を付け直すと変換が可能という事になる。
<a href="http://uda2.com/isbn.php" target="_blank">ISBN変換</a></p>The post <a href="https://uda2.com/blog/isbn/">ISBN変換</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/isbn/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
