mirror of
https://github.com/php/doc-ja.git
synced 2026-04-25 00:48:05 +02:00
97d4b3b8bf
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@193050 c90b9560-bf6c-de11-be94-00142212c4b1
82 lines
2.7 KiB
XML
82 lines
2.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<!-- splitted from ./ja/functions/mbstring.xml, last change in rev 1.1 -->
|
|
<!-- EN-Revision: 1.4 Maintainer: hirokawa Status: ready -->
|
|
<!-- CREDITS: takagi -->
|
|
<refentry id="function.mb-convert-encoding">
|
|
<refnamediv>
|
|
<refname>mb_convert_encoding</refname>
|
|
<refpurpose>文字エンコーディングを変換する</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>説明</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>mb_convert_encoding</methodname>
|
|
<methodparam><type>string</type><parameter>str</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>to_encoding</parameter></methodparam>
|
|
<methodparam choice="opt"><type>mixed</type><parameter>from_encoding</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>mb_convert_encoding</function> は、文字列
|
|
<parameter>str</parameter>の文字エンコーディングを
|
|
<parameter>from_encoding</parameter> から
|
|
<parameter>to_encoding</parameter> に変換します。
|
|
</para>
|
|
<para>
|
|
<parameter>str</parameter> : 変換する文字列。
|
|
</para>
|
|
<para>
|
|
<parameter>from_encoding</parameter> により変換前の文字エンコーディ
|
|
ング名が指定されます。これは、配列またはカンマ区切りの文字列とす
|
|
ることが可能です。省略時のデフォルトは内部文字エンコーディングで
|
|
す。
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>mb_convert_encoding</function>の例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
/* 内部文字エンコーディングからSJISに変換 */
|
|
$str = mb_convert_encoding($str, "SJIS");
|
|
|
|
/* EUC-JPからUTF-7に変換 */
|
|
$str = mb_convert_encoding($str, "UTF-7", "EUC-JP");
|
|
|
|
/* JIS, eucjp-win, sjis-winの順番で自動検出し、UCS-2LEに変換 */
|
|
$str = mb_convert_encoding($str, "UCS-2LE", "JIS, eucjp-win, sjis-win");
|
|
|
|
/* "auto" は、"ASCII,JIS,UTF-8,EUC-JP,SJIS" に展開される */
|
|
$str = mb_convert_encoding($str, "EUC-JP", "auto");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<function>mb_detect_order</function> も参照ください。
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|