ctype.xml revision 1.1.1.1.8.1
1<section xmlns="http://docbook.org/ns/docbook" version="5.0" 2 xml:id="std.localization.facet.ctype" xreflabel="ctype"> 3<?dbhtml filename="ctype.html"?> 4 5<info><title>ctype</title> 6 <keywordset> 7 <keyword>ISO C++</keyword> 8 <keyword>ctype</keyword> 9 </keywordset> 10</info> 11 12 13 14<section xml:id="facet.ctype.impl"><info><title>Implementation</title></info> 15 16 17 <section><info><title>Specializations</title></info> 18 19 20<para> 21For the required specialization codecvt<wchar_t, char, mbstate_t> , 22conversions are made between the internal character set (always UCS4 23on GNU/Linux) and whatever the currently selected locale for the 24LC_CTYPE category implements. 25</para> 26 27<para> 28The two required specializations are implemented as follows: 29</para> 30 31<para> 32<code> 33ctype<char> 34</code> 35</para> 36<para> 37This is simple specialization. Implementing this was a piece of cake. 38</para> 39 40<para> 41<code> 42ctype<wchar_t> 43</code> 44</para> 45<para> 46This specialization, by specifying all the template parameters, pretty 47much ties the hands of implementors. As such, the implementation is 48straightforward, involving mcsrtombs for the conversions between char 49to wchar_t and wcsrtombs for conversions between wchar_t and char. 50</para> 51 52<para> 53Neither of these two required specializations deals with Unicode 54characters. 55</para> 56 57 </section> 58</section> 59 60<section xml:id="facet.ctype.future"><info><title>Future</title></info> 61 62 63 64<itemizedlist> 65 <listitem> 66 <para> 67 How to deal with the global locale issue? 68 </para></listitem> 69 70 <listitem> 71 <para> 72 How to deal with different types than char, wchar_t? </para></listitem> 73 74 <listitem><para> 75 Overlap between codecvt/ctype: narrow/widen 76 </para></listitem> 77 78 <listitem> 79 <para> 80 Mask typedef in codecvt_base, argument types in codecvt. what 81 is know about this type? 82 </para></listitem> 83 84 <listitem> 85 <para> 86 Why mask* argument in codecvt? 87 </para></listitem> 88 89 <listitem> 90 <para> 91 Can this be made (more) generic? is there a simple way to 92 straighten out the configure-time mess that is a by-product of 93 this class? 94 </para></listitem> 95 96 <listitem> 97 <para> 98 Get the ctype<wchar_t>::mask stuff under control. Need to 99 make some kind of static table, and not do lookup every time 100 somebody hits the do_is... functions. Too bad we can't just 101 redefine mask for ctype<wchar_t> 102 </para></listitem> 103 104 <listitem> 105 <para> 106 Rename abstract base class. See if just smash-overriding is a 107 better approach. Clarify, add sanity to naming. 108 </para> 109 </listitem> 110 111</itemizedlist> 112 113 114</section> 115 116 117<bibliography xml:id="facet.ctype.biblio"><info><title>Bibliography</title></info> 118 119 120 <biblioentry> 121 <citetitle> 122 The GNU C Library 123 </citetitle> 124 <author><personname><surname>McGrath</surname><firstname>Roland</firstname></personname></author> 125 <author><personname><surname>Drepper</surname><firstname>Ulrich</firstname></personname></author> 126 <copyright> 127 <year>2007</year> 128 <holder>FSF</holder> 129 </copyright> 130 <pagenums>Chapters 6 Character Set Handling and 7 Locales and Internationalization</pagenums> 131 </biblioentry> 132 133 <biblioentry> 134 <citetitle> 135 Correspondence 136 </citetitle> 137 <author><personname><surname>Drepper</surname><firstname>Ulrich</firstname></personname></author> 138 <copyright> 139 <year>2002</year> 140 <holder/> 141 </copyright> 142 </biblioentry> 143 144 <biblioentry> 145 <citetitle> 146 ISO/IEC 14882:1998 Programming languages - C++ 147 </citetitle> 148 <copyright> 149 <year>1998</year> 150 <holder>ISO</holder> 151 </copyright> 152 </biblioentry> 153 154 <biblioentry> 155 <citetitle> 156 ISO/IEC 9899:1999 Programming languages - C 157 </citetitle> 158 <copyright> 159 <year>1999</year> 160 <holder>ISO</holder> 161 </copyright> 162 </biblioentry> 163 164 <biblioentry> 165 <title> 166 <link xmlns:xlink="http://www.w3.org/1999/xlink" 167 xlink:href="http://www.unix.org/version3/ieee_std.html"> 168 The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004) 169 </link> 170 </title> 171 172 <copyright> 173 <year>1999</year> 174 <holder> 175 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder> 176 </copyright> 177 </biblioentry> 178 179 <biblioentry> 180 <citetitle> 181 The C++ Programming Language, Special Edition 182 </citetitle> 183 <author><personname><surname>Stroustrup</surname><firstname>Bjarne</firstname></personname></author> 184 <copyright> 185 <year>2000</year> 186 <holder>Addison Wesley, Inc.</holder> 187 </copyright> 188 <pagenums>Appendix D</pagenums> 189 <publisher> 190 <publishername> 191 Addison Wesley 192 </publishername> 193 </publisher> 194 </biblioentry> 195 196 <biblioentry> 197 <citetitle> 198 Standard C++ IOStreams and Locales 199 </citetitle> 200 <subtitle> 201 Advanced Programmer's Guide and Reference 202 </subtitle> 203 <author><personname><surname>Langer</surname><firstname>Angelika</firstname></personname></author> 204 <author><personname><surname>Kreft</surname><firstname>Klaus</firstname></personname></author> 205 <copyright> 206 <year>2000</year> 207 <holder>Addison Wesley Longman, Inc.</holder> 208 </copyright> 209 <publisher> 210 <publishername> 211 Addison Wesley Longman 212 </publishername> 213 </publisher> 214 </biblioentry> 215 216</bibliography> 217 218</section> 219