ibm-information-center/dist/eclipse/plugins/i5OS.ic.dm_5.4.0.1/rbal3cucc.htm

98 lines
6.1 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2005" />
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Convert universal coded character set transformation format (UTF-8 character &amp; UTF-16 graphic)" />
<meta name="DC.Relation" scheme="URI" content="rbal3copydbmbrfmt.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3cucc" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Convert universal coded character set transformation format (UTF-8
character &amp; UTF-16 graphic)</title>
</head>
<body id="rbal3cucc"><a name="rbal3cucc"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Convert universal coded character set transformation format (UTF-8
character &amp; UTF-16 graphic)</h1>
<div><p>Using FMTOPT(*MAP) to copy to a UTF-8 character or UTF-16 graphic field
converts the data in the from-field CCSID to the CCSID of the UTF-8 character
or UTF-16 graphic to-field. If the length after conversion is less than the
length of the UTF-8 or UTF-16 graphic to-field, the field is padded. If the
length after conversion is greater than the length of the UTF-8 character
or UTF-16 graphic to-field, the field is truncated.</p>
<p>Using FMTOPT(*MAP) to copy from a UTF-8 character or UTF-16 graphic field
converts the data from the CCSID of the UTF-8 character or UTF-16 graphic
field to the CCSID of the to-field. If the length after conversion is less
than the length of the to-field, the field is padded. If the length after
conversion is greater than the length of the to-field, the field is truncated.</p>
<p>UTF-8 or UTF-16 conversion possibilities also include variable length fields.
Generally, the result length of a variable length to-field will be the minimum
of the from-field converted length and the maximum length of the to-field.</p>
<p>The CCSID conversions created when copying from or to a UTF-8 or UTF-16
field might cause the byte length of the data to be different after the conversion.
The maximum length of the to-field is used to determine if all of the converted
data will fit in the to-field.</p>
<p>When copying from a UTF-8 or UTF-16 field to a character field, or to a
DBCS-either field where the first byte is already converted to a valid SBCS
character (not a shift-out X'0E'), any remaining characters that cannot be
converted to SBCS (actual double-byte data in the UTF-8 or UTF-16 field) will
have a single-byte substitution character set in its place.</p>
<p>When copying from a UTF-8 or UTF-16 field to a DBCS-only, DBCS-graphic
field, or to a DBCS-either field where the first byte is already converted
to a DBCS shift-out (X'0E'), any remaining characters that cannot be converted
to DBCS will have a double-byte substitution character set in its place.</p>
<p>To be successful when using FMTOPT (*MAP) to convert from or to a UTF-8
or UTF-16 data, the resulting converted data for the to-field must conform
to the to-field type. Otherwise, conversion errors will occur and the to-field
will be set to its default value.</p>
<p>FMTOPT (*MAP) has to be specified when you copy from a non-normalize file
to a normalize file. The to file will be a normalize file in any cases described
in the following table:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="0" rules="none"><thead align="left"><tr><th align="left" valign="top" width="50%" id="d0e29">FromFile (non-normalize)</th>
<th align="left" valign="top" width="50%" id="d0e31">ToFile (normalize)</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="50%" headers="d0e29 ">UTF-8</td>
<td align="left" valign="top" width="50%" headers="d0e31 ">UTF-8</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e29 ">UTF-8</td>
<td align="left" valign="top" width="50%" headers="d0e31 ">UTF-16</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e29 ">UTF-16</td>
<td align="left" valign="top" width="50%" headers="d0e31 ">UTF-16</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e29 ">UTF-16</td>
<td align="left" valign="top" width="50%" headers="d0e31 ">UTF-8</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e29 ">UCS2</td>
<td align="left" valign="top" width="50%" headers="d0e31 ">UTF-8</td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e29 ">UCS2</td>
<td align="left" valign="top" width="50%" headers="d0e31 ">UTF-16</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3copydbmbrfmt.htm" title="When you copy from a database file to a database file, you must use the FMTOPT parameter if the record formats are not identical or if the files are different types (source or data). If either file is a device file or inline data file, the FMTOPT parameter does not apply. The records are truncated or padded with blanks or zeros when record lengths are different. A message is sent if the records are truncated.">Copying between different database record formats (FMTOPT parameter)</a></div>
</div>
</div>
</body>
</html>