<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.mbstring.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'mbstring.ja-basic.php',
    1 => 'Basics of Japanese multi-byte encodings',
    2 => 'Basics of Japanese multi-byte encodings',
  ),
  'up' => 
  array (
    0 => 'book.mbstring.php',
    1 => 'Multibyte String',
  ),
  'prev' => 
  array (
    0 => 'mbstring.encodings.php',
    1 => 'Summaries of supported encodings',
  ),
  'next' => 
  array (
    0 => 'mbstring.http.php',
    1 => 'HTTP Input and Output',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mbstring/ja-basic.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mbstring.ja-basic" class="chapter">
 <h1 class="title">Basics of Japanese multi-byte encodings</h1>

 <p class="para">
  Japanese characters can only be represented by multibyte encodings, 
  and multiple encoding standards are used depending on platform and 
  text purpose. To make matters worse, these encoding standards 
  differ slightly from one another. In order to create a web 
  application which would be usable in a Japanese environment, a 
  developer has to keep these complexities in mind to ensure that the
  proper character encodings are used.
 </p>
 <p class="para">
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">Storage for a character can be up to six bytes</span>
   </li>
   <li class="listitem">
    <span class="simpara">
     Most Japanese multibyte characters appear twice as wide as
     single-byte characters. These characters are called 
     &quot;zen-kaku&quot; in Japanese, which means 
     &quot;full width&quot;. Other, narrower, characters are called 
     &quot;han-kaku&quot;, which means &quot;half width&quot;. The 
     graphical properties of the characters, however, depends upon 
     the type faces used to display them.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     Some character encodings use shift(escape) sequences defined
     in ISO-2022 to switch the code map of the specific code area
     (<code class="literal">00h</code> to <code class="literal">7fh</code>).
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     ISO-2022-JP should be used in SMTP/NNTP, and headers and entities
     should be reencoded as per RFC requirements. Although those are not
     requisites, it&#039;s still a good idea because several popular user
     agents cannot recognize any other encoding methods.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     Web pages created for mobile phone services such as
     <a href="http://www.nttdocomo.com/services/imode/" class="link external">&raquo;&nbsp;i-mode</a>
     or <a href="http://www.au.kddi.com/english/service/ezweb/index.html" class="link external">&raquo;&nbsp;EZweb</a>
     are supposed to use Shift_JIS.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
      Emoji used for mobile phone service such as 
      <a href="http://www.nttdocomo.com/services/imode/" class="link external">&raquo;&nbsp;i-mode</a>
      or <a href="http://www.au.kddi.com/english/service/ezweb/index.html" class="link external">&raquo;&nbsp;EZweb</a>
      are supported.
    </span>
   </li>
  </ul>
 </p>
</div>
<?php manual_footer($setup); ?>