Files
hdf5/develop/group___a_c_p_l.html
T
2026-09-02 01:23:41 +00:00

256 lines
16 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.16.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>HDF5: Attribute Creation Properties</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="hdf5doxy.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="hdf5doxy.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="hdf5_navtree_hacks.js"></script>
<div style="background:#FFDDDD;font-size:120%;text-align:center;margin:0;padding:5px">Help us improve by taking our short survey: <a href="https://www.hdfgroup.org/website-survey/">https://www.hdfgroup.org/website-survey/</a></div>
<!-- ... other metadata & script includes ... -->
<script type="text/javascript" src="doxygen-awesome-tabs.js"></script>
<script type="text/javascript">
DoxygenAwesomeTabs.init()
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-57FMZK4S7X"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-57FMZK4S7X');
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="HDFG-logo.png"/></td>
<td id="projectalign">
<div id="projectname">HDF5<span id="projectnumber">&#160;Last Updated on 2026-09-02</span>
</div>
<div id="projectbrief">The HDF5 Field Guide</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.16.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<div id="main-nav">
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="_getting_started.html"><span>Getting&#160;started</span></a></li>
<li><a href="_u_g.html"><span>User&#160;Guide</span></a></li>
<li><a href="_r_m.html"><span>Reference&#160;Manual</span></a></li>
<li><a href="_cookbook.html"><span>Cookbook</span></a></li>
<li><a href="_t_n.html"><span>Technical&#160;Notes</span></a></li>
<li><a href="_r_f_c.html"><span>RFCs</span></a></li>
<li><a href="_s_p_e_c.html"><span>Specifications</span></a></li>
<li><a href="_g_l_s.html"><span>Glossary</span></a></li>
<li><a href="_f_t_s.html"><span>Full-Text&#160;Search</span></a></li>
<li><a href="_about.html"><span>About</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" class="search-icon" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"><span class="search-icon-dropdown"></span></span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><div id="MSearchCloseImg" class="close-icon"></div></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- main-nav -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(function(){initNavTree('group___a_c_p_l.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">Attribute Creation Properties <div class="ingroups"><a class="el" href="group___h5_p.html">Property Lists (H5P)</a> &raquo; <a class="el" href="group___s_t_r_c_p_l.html">String Creation Properties</a></div></div></div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The creation property, the choice of a character encoding, applies to attributes. </p><div> <table class="doxtable">
<caption border="1" style="background-color:whitesmoke;">Attribute creation property list functions (H5P)</caption>
<tr>
<th>Function</th><th>Purpose</th></tr>
<tr>
<td><a class="el" href="#gad4fa8e2d17236786f770cf17eef908cc" title="Sets the character encoding used to encode link and attribute names.">H5Pset_char_encoding</a>/<a class="el" href="#ga9b35ef9add6463997330e9b4b606603d" title="Retrieves the character encoding used to create a link or attribute name.">H5Pget_char_encoding</a></td><td>Sets/gets the character encoding used to encode link and attribute names.</td></tr>
</table>
</div><div></div><dl class="section see"><dt>See also</dt><dd><a class="el" href="group___s_t_r_c_p_l.html" title="String Creation Properties">String Creation Properties</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga9b35ef9add6463997330e9b4b606603d" id="r_ga9b35ef9add6463997330e9b4b606603d"><td class="memItemLeft"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a>&#160;</td><td class="memItemRight"><a class="el" href="#ga9b35ef9add6463997330e9b4b606603d">H5Pget_char_encoding</a> (<a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> plist_id, <a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71a">H5T_cset_t</a> *encoding)</td></tr>
<tr class="memdesc:ga9b35ef9add6463997330e9b4b606603d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the character encoding used to create a link or attribute name. <br /></td></tr>
<tr class="memitem:gad4fa8e2d17236786f770cf17eef908cc" id="r_gad4fa8e2d17236786f770cf17eef908cc"><td class="memItemLeft"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a>&#160;</td><td class="memItemRight"><a class="el" href="#gad4fa8e2d17236786f770cf17eef908cc">H5Pset_char_encoding</a> (<a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a> plist_id, <a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71a">H5T_cset_t</a> encoding)</td></tr>
<tr class="memdesc:gad4fa8e2d17236786f770cf17eef908cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the character encoding used to encode link and attribute names. <br /></td></tr>
</table>
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2>
<a id="ga9b35ef9add6463997330e9b4b606603d" name="ga9b35ef9add6463997330e9b4b606603d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9b35ef9add6463997330e9b4b606603d">&#9670;&#160;</a></span>H5Pget_char_encoding()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> H5Pget_char_encoding </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td> <td class="paramname"><span class="paramname"><em>plist_id</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71a">H5T_cset_t</a> *</td> <td class="paramname"><span class="paramname"><em>encoding</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the character encoding used to create a link or attribute name. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">plist_id</td><td>Link creation or attribute creation property list identifier </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">encoding</td><td>String encoding character set</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a non-negative value if successful; otherwise, returns a negative value.</dd></dl>
<p><a class="el" href="#ga9b35ef9add6463997330e9b4b606603d" title="Retrieves the character encoding used to create a link or attribute name.">H5Pget_char_encoding()</a> retrieves the character encoding used to encode link or attribute names that are created with the property list <code class="param">plist_id</code>.</p>
<p>Valid values for <code class="param">encoding</code> are defined in <a class="el" href="_h5_tpublic_8h.html">H5Tpublic.h</a> and include the following:</p>
<table class="doxtable">
<tr>
<td><a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663">H5T_CSET_ASCII</a></td><td>US ASCII</td></tr>
<tr>
<td><a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa41685667f69bf81eb7de5dd5f452e658">H5T_CSET_UTF8</a></td><td>UTF-8 Unicode encoding</td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="#ga9b35ef9add6463997330e9b4b606603d" title="Retrieves the character encoding used to create a link or attribute name.">H5Pget_char_encoding()</a> retrieves the character set used for an HDF5 link or attribute name while <a class="el" href="group___a_t_o_m.html#ga5bc2f3e8f708f5bcdd0d8667950310c1" title="Retrieves the character set type of a string datatype.">H5Tget_cset()</a> retrieves the character set used in a character or string datatype.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>1.8.0 </dd></dl>
</div>
</div>
<a id="gad4fa8e2d17236786f770cf17eef908cc" name="gad4fa8e2d17236786f770cf17eef908cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad4fa8e2d17236786f770cf17eef908cc">&#9670;&#160;</a></span>H5Pset_char_encoding()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_h5public_8h.html#a3b079ecf932a5c599499cf7e298af160">herr_t</a> H5Pset_char_encoding </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_h5_ipublic_8h.html#a0045db7ff9c22ad35db6ae91662e1943">hid_t</a></td> <td class="paramname"><span class="paramname"><em>plist_id</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71a">H5T_cset_t</a></td> <td class="paramname"><span class="paramname"><em>encoding</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the character encoding used to encode link and attribute names. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">plist_id</td><td>Link creation or attribute creation property list identifier </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">encoding</td><td>String encoding character set</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Returns a non-negative value if successful; otherwise, returns a negative value.</dd></dl>
<p><a class="el" href="#gad4fa8e2d17236786f770cf17eef908cc" title="Sets the character encoding used to encode link and attribute names.">H5Pset_char_encoding()</a> sets the character encoding used for the names of links (which provide the names by which objects are referenced) or attributes created with the property list <code class="param">plist_id</code>.</p>
<p>Valid values for encoding include the following: </p><table class="doxtable">
<tr>
<td><a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa27383e03d1cad9b4c32d8611a145d663">H5T_CSET_ASCII</a></td><td>US ASCII</td></tr>
<tr>
<td><a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa41685667f69bf81eb7de5dd5f452e658">H5T_CSET_UTF8</a></td><td>UTF-8 Unicode encoding</td></tr>
</table>
<p>For example, if the character set for the property list <code class="param">plist_id</code> is set to <a class="el" href="_h5_tpublic_8h.html#a03755b8370672668ddc7063add28e71aa41685667f69bf81eb7de5dd5f452e658">H5T_CSET_UTF8</a>, link names pointing to objects created with the link creation property list <code class="param">plist_id</code> will be encoded using the UTF-8 character set. Similarly, names of attributes created with the attribute creation property list <code class="param">plist_id</code> will be encoded as UTF-8.</p>
<p>ASCII and UTF-8 Unicode are the only currently supported character encodings. Extended ASCII encodings (for example, ISO 8859) are not supported. This encoding policy is not enforced by the HDF5 library. Using encodings other than ASCII and UTF-8 can lead to compatibility and usability problems.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="#gad4fa8e2d17236786f770cf17eef908cc" title="Sets the character encoding used to encode link and attribute names.">H5Pset_char_encoding()</a> sets the character set used for an HDF5 link or attribute name while <a class="el" href="group___a_t_o_m.html#ga4909c0c3d97c3d212fee032cc8dc031a" title="Sets character set to be used in a string or character datatype.">H5Tset_cset()</a> sets the character set used in a character or string datatype.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>1.8.0 </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="page-nav" class="page-nav-panel">
<div id="page-nav-resize-handle"></div>
<div id="page-nav-tree">
<div id="page-nav-contents">
</div><!-- page-nav-contents -->
</div><!-- page-nav-tree -->
</div><!-- page-nav -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.16.1 </li>
</ul>
</div>
</body>
</html>