| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:30+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "mbstowcs" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 28 |
#: opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "2026-02-08" |
| 31 |
msgstr "" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "" |
| 38 |
|
| 39 |
#. type: SH |
| 40 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 41 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 42 |
#, no-wrap |
| 43 |
msgid "NAME" |
| 44 |
msgstr "" |
| 45 |
|
| 46 |
#. type: Plain text |
| 47 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 48 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 49 |
msgid "mbstowcs - convert a multibyte string to a wide-character string" |
| 50 |
msgstr "" |
| 51 |
|
| 52 |
#. type: SH |
| 53 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 54 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 55 |
#, no-wrap |
| 56 |
msgid "LIBRARY" |
| 57 |
msgstr "" |
| 58 |
|
| 59 |
#. type: Plain text |
| 60 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 61 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 62 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 63 |
msgstr "" |
| 64 |
|
| 65 |
#. type: SH |
| 66 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 67 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 68 |
#, no-wrap |
| 69 |
msgid "SYNOPSIS" |
| 70 |
msgstr "" |
| 71 |
|
| 72 |
#. type: Plain text |
| 73 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 74 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 75 |
#, no-wrap |
| 76 |
msgid "B<#include E<lt>stdlib.hE<gt>>\n" |
| 77 |
msgstr "" |
| 78 |
|
| 79 |
#. type: Plain text |
| 80 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 81 |
#: opensuse-tumbleweed |
| 82 |
#, no-wrap |
| 83 |
msgid "" |
| 84 |
"B<size_t mbstowcs(>size_t dsize;\n" |
| 85 |
"B< wchar_t >I<dest>B<[restrict >I<dsize>B<], const char *restrict >I<src>B<,>\n" |
| 86 |
"B< size_t >I<dsize>B<);>\n" |
| 87 |
msgstr "" |
| 88 |
|
| 89 |
#. type: SH |
| 90 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 91 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 92 |
#, no-wrap |
| 93 |
msgid "DESCRIPTION" |
| 94 |
msgstr "" |
| 95 |
|
| 96 |
#. type: Plain text |
| 97 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 98 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 99 |
msgid "" |
| 100 |
"If I<dest> is not NULL, convert the multibyte string I<src> to a wide-" |
| 101 |
"character string starting at I<dest>. At most I<dsize> wide characters are " |
| 102 |
"written to I<dest>. The sequence of characters in the string I<src> shall " |
| 103 |
"begin in the initial shift state. The conversion can stop for three reasons:" |
| 104 |
msgstr "" |
| 105 |
|
| 106 |
#. type: IP |
| 107 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 108 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 109 |
#, no-wrap |
| 110 |
msgid "\\[bu]" |
| 111 |
msgstr "" |
| 112 |
|
| 113 |
#. type: Plain text |
| 114 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 115 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 116 |
msgid "" |
| 117 |
"An invalid multibyte sequence has been encountered. In this case, I<(size_t)" |
| 118 |
"\\ -1> is returned." |
| 119 |
msgstr "" |
| 120 |
|
| 121 |
#. type: Plain text |
| 122 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 123 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 124 |
msgid "" |
| 125 |
"I<dsize> non-L\\[aq]\\[rs]0\\[aq] wide characters have been stored at " |
| 126 |
"I<dest>. In this case, the number of wide characters written to I<dest> is " |
| 127 |
"returned, but the shift state at this point is lost." |
| 128 |
msgstr "" |
| 129 |
|
| 130 |
#. type: Plain text |
| 131 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 132 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 133 |
msgid "" |
| 134 |
"The multibyte string has been completely converted, including the " |
| 135 |
"terminating null character (\\[aq]\\[rs]0\\[aq]). In this case, the number " |
| 136 |
"of wide characters written to I<dest>, excluding the terminating null wide " |
| 137 |
"character, is returned." |
| 138 |
msgstr "" |
| 139 |
|
| 140 |
#. type: Plain text |
| 141 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 142 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 143 |
msgid "" |
| 144 |
"If I<dest> is NULL, I<dsize> is ignored, and the conversion proceeds as " |
| 145 |
"above, except that the converted wide characters are not written out to " |
| 146 |
"memory, and that no length limit exists." |
| 147 |
msgstr "" |
| 148 |
|
| 149 |
#. type: Plain text |
| 150 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 151 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 152 |
msgid "" |
| 153 |
"In order to avoid the case 2 above, the programmer should make sure I<dsize> " |
| 154 |
"is greater than or equal to I<mbstowcs(NULL,src,0)+1>." |
| 155 |
msgstr "" |
| 156 |
|
| 157 |
#. type: Plain text |
| 158 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 159 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 160 |
msgid "" |
| 161 |
"The programmer must ensure that there is room for at least I<dsize> wide " |
| 162 |
"characters at I<dest>." |
| 163 |
msgstr "" |
| 164 |
|
| 165 |
#. type: SH |
| 166 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 167 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 168 |
#, no-wrap |
| 169 |
msgid "RETURN VALUE" |
| 170 |
msgstr "" |
| 171 |
|
| 172 |
#. type: Plain text |
| 173 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 174 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 175 |
msgid "" |
| 176 |
"The number of wide characters that make up the converted part of the wide-" |
| 177 |
"character string, not including the terminating null wide character. If an " |
| 178 |
"invalid multibyte sequence was encountered, I<(size_t)\\ -1> is returned." |
| 179 |
msgstr "" |
| 180 |
|
| 181 |
#. type: SH |
| 182 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 183 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 184 |
#, no-wrap |
| 185 |
msgid "ATTRIBUTES" |
| 186 |
msgstr "" |
| 187 |
|
| 188 |
#. type: Plain text |
| 189 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 190 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 191 |
msgid "" |
| 192 |
"For an explanation of the terms used in this section, see B<attributes>(7)." |
| 193 |
msgstr "" |
| 194 |
|
| 195 |
#. type: tbl table |
| 196 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 197 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 198 |
#, no-wrap |
| 199 |
msgid "Interface" |
| 200 |
msgstr "" |
| 201 |
|
| 202 |
#. type: tbl table |
| 203 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 204 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 205 |
#, no-wrap |
| 206 |
msgid "Attribute" |
| 207 |
msgstr "" |
| 208 |
|
| 209 |
#. type: tbl table |
| 210 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 211 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 212 |
#, no-wrap |
| 213 |
msgid "Value" |
| 214 |
msgstr "" |
| 215 |
|
| 216 |
#. type: tbl table |
| 217 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 218 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 219 |
#, no-wrap |
| 220 |
msgid ".na\n" |
| 221 |
msgstr "" |
| 222 |
|
| 223 |
#. type: tbl table |
| 224 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 225 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 226 |
#, no-wrap |
| 227 |
msgid ".nh\n" |
| 228 |
msgstr "" |
| 229 |
|
| 230 |
#. type: tbl table |
| 231 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 232 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 233 |
#, no-wrap |
| 234 |
msgid "B<mbstowcs>()" |
| 235 |
msgstr "" |
| 236 |
|
| 237 |
#. type: tbl table |
| 238 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 239 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 240 |
#, no-wrap |
| 241 |
msgid "Thread safety" |
| 242 |
msgstr "" |
| 243 |
|
| 244 |
#. type: tbl table |
| 245 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 246 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 247 |
#, no-wrap |
| 248 |
msgid "MT-Safe" |
| 249 |
msgstr "" |
| 250 |
|
| 251 |
#. type: SH |
| 252 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 253 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 254 |
#, no-wrap |
| 255 |
msgid "VERSIONS" |
| 256 |
msgstr "" |
| 257 |
|
| 258 |
#. type: Plain text |
| 259 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 260 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 261 |
msgid "" |
| 262 |
"The function B<mbsrtowcs>(3) provides a better interface to the same " |
| 263 |
"functionality." |
| 264 |
msgstr "" |
| 265 |
|
| 266 |
#. type: SH |
| 267 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 268 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 269 |
#, no-wrap |
| 270 |
msgid "STANDARDS" |
| 271 |
msgstr "" |
| 272 |
|
| 273 |
#. type: Plain text |
| 274 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 275 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 276 |
msgid "C11, POSIX.1-2008." |
| 277 |
msgstr "" |
| 278 |
|
| 279 |
#. type: SH |
| 280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
#, no-wrap |
| 283 |
msgid "HISTORY" |
| 284 |
msgstr "" |
| 285 |
|
| 286 |
#. type: Plain text |
| 287 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 288 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 289 |
msgid "POSIX.1-2001, C99." |
| 290 |
msgstr "" |
| 291 |
|
| 292 |
#. type: SH |
| 293 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 294 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 295 |
#, no-wrap |
| 296 |
msgid "NOTES" |
| 297 |
msgstr "" |
| 298 |
|
| 299 |
#. type: Plain text |
| 300 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 301 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 302 |
msgid "" |
| 303 |
"The behavior of B<mbstowcs>() depends on the B<LC_CTYPE> category of the " |
| 304 |
"current locale." |
| 305 |
msgstr "" |
| 306 |
|
| 307 |
#. type: SH |
| 308 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 309 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 310 |
#, no-wrap |
| 311 |
msgid "EXAMPLES" |
| 312 |
msgstr "" |
| 313 |
|
| 314 |
#. type: Plain text |
| 315 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 316 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 317 |
msgid "" |
| 318 |
"The program below illustrates the use of B<mbstowcs>(), as well as some of " |
| 319 |
"the wide character classification functions. An example run is the " |
| 320 |
"following:" |
| 321 |
msgstr "" |
| 322 |
|
| 323 |
#. type: Plain text |
| 324 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 325 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 326 |
#, no-wrap |
| 327 |
msgid "" |
| 328 |
"$ ./t_mbstowcs de_DE.UTF-8 Grüße!\n" |
| 329 |
"Length of source string (excluding terminator):\n" |
| 330 |
" 8 bytes\n" |
| 331 |
" 6 multibyte characters\n" |
| 332 |
"\\&\n" |
| 333 |
"Wide character string is: Grüße! (6 characters)\n" |
| 334 |
" G alpha upper\n" |
| 335 |
" r alpha lower\n" |
| 336 |
" ü alpha lower\n" |
| 337 |
" ß alpha lower\n" |
| 338 |
" e alpha lower\n" |
| 339 |
" ! !alpha\n" |
| 340 |
msgstr "" |
| 341 |
|
| 342 |
#. type: SS |
| 343 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 344 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 345 |
#, no-wrap |
| 346 |
msgid "Program source" |
| 347 |
msgstr "" |
| 348 |
|
| 349 |
#. type: Plain text |
| 350 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 351 |
#: opensuse-tumbleweed |
| 352 |
#, no-wrap |
| 353 |
msgid "" |
| 354 |
"#include E<lt>locale.hE<gt>\n" |
| 355 |
"#include E<lt>stdio.hE<gt>\n" |
| 356 |
"#include E<lt>stdlib.hE<gt>\n" |
| 357 |
"#include E<lt>string.hE<gt>\n" |
| 358 |
"#include E<lt>wchar.hE<gt>\n" |
| 359 |
"#include E<lt>wctype.hE<gt>\n" |
| 360 |
"\\&\n" |
| 361 |
"int\n" |
| 362 |
"main(int argc, char *argv[])\n" |
| 363 |
"{\n" |
| 364 |
" size_t mbslen; /* Number of multibyte characters in source */\n" |
| 365 |
" wchar_t *wcs; /* Pointer to converted wide character string */\n" |
| 366 |
"\\&\n" |
| 367 |
" if (argc E<lt> 3) {\n" |
| 368 |
" fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n" |
| 369 |
" exit(EXIT_FAILURE);\n" |
| 370 |
" }\n" |
| 371 |
"\\&\n" |
| 372 |
" /* Apply the specified locale. */\n" |
| 373 |
"\\&\n" |
| 374 |
" if (setlocale(LC_ALL, argv[1]) == NULL) {\n" |
| 375 |
" perror(\"setlocale\");\n" |
| 376 |
" exit(EXIT_FAILURE);\n" |
| 377 |
" }\n" |
| 378 |
"\\&\n" |
| 379 |
" /* Calculate the length required to hold argv[2] converted to\n" |
| 380 |
" a wide character string. */\n" |
| 381 |
"\\&\n" |
| 382 |
" mbslen = mbstowcs(NULL, argv[2], 0);\n" |
| 383 |
" if (mbslen == (size_t) -1) {\n" |
| 384 |
" perror(\"mbstowcs\");\n" |
| 385 |
" exit(EXIT_FAILURE);\n" |
| 386 |
" }\n" |
| 387 |
"\\&\n" |
| 388 |
" /* Describe the source string to the user. */\n" |
| 389 |
"\\&\n" |
| 390 |
" printf(\"Length of source string (excluding terminator):\\[rs]n\");\n" |
| 391 |
" printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n" |
| 392 |
" printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n" |
| 393 |
"\\&\n" |
| 394 |
" /* Allocate wide character string of the desired size. Add 1\n" |
| 395 |
" to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n" |
| 396 |
"\\&\n" |
| 397 |
" wcs = calloc(mbslen + 1, sizeof(*wcs));\n" |
| 398 |
" if (wcs == NULL) {\n" |
| 399 |
" perror(\"calloc\");\n" |
| 400 |
" exit(EXIT_FAILURE);\n" |
| 401 |
" }\n" |
| 402 |
"\\&\n" |
| 403 |
" /* Convert the multibyte character string in argv[2] to a\n" |
| 404 |
" wide character string. */\n" |
| 405 |
"\\&\n" |
| 406 |
" if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n" |
| 407 |
" perror(\"mbstowcs\");\n" |
| 408 |
" exit(EXIT_FAILURE);\n" |
| 409 |
" }\n" |
| 410 |
"\\&\n" |
| 411 |
" printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n" |
| 412 |
" wcs, mbslen);\n" |
| 413 |
"\\&\n" |
| 414 |
" /* Now do some inspection of the classes of the characters in\n" |
| 415 |
" the wide character string. */\n" |
| 416 |
"\\&\n" |
| 417 |
" for (wchar_t *wp = wcs; *wp != 0; wp++) {\n" |
| 418 |
" printf(\" %lc \", (wint_t) *wp);\n" |
| 419 |
"\\&\n" |
| 420 |
" if (!iswalpha(*wp))\n" |
| 421 |
" printf(\"!\");\n" |
| 422 |
" printf(\"alpha \");\n" |
| 423 |
"\\&\n" |
| 424 |
" if (iswalpha(*wp)) {\n" |
| 425 |
" if (iswupper(*wp))\n" |
| 426 |
" printf(\"upper \");\n" |
| 427 |
"\\&\n" |
| 428 |
" if (iswlower(*wp))\n" |
| 429 |
" printf(\"lower \");\n" |
| 430 |
" }\n" |
| 431 |
"\\&\n" |
| 432 |
" putchar(\\[aq]\\[rs]n\\[aq]);\n" |
| 433 |
" }\n" |
| 434 |
"\\&\n" |
| 435 |
" exit(EXIT_SUCCESS);\n" |
| 436 |
"}\n" |
| 437 |
msgstr "" |
| 438 |
|
| 439 |
#. SRC END |
| 440 |
#. type: SH |
| 441 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 442 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 443 |
#, no-wrap |
| 444 |
msgid "SEE ALSO" |
| 445 |
msgstr "" |
| 446 |
|
| 447 |
#. type: Plain text |
| 448 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 449 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 450 |
msgid "" |
| 451 |
"B<mblen>(3), B<mbsrtowcs>(3), B<mbtowc>(3), B<wcstombs>(3), B<wctomb>(3)" |
| 452 |
msgstr "" |
| 453 |
|
| 454 |
#. type: TH |
| 455 |
#: debian-trixie |
| 456 |
#, no-wrap |
| 457 |
msgid "2024-06-15" |
| 458 |
msgstr "" |
| 459 |
|
| 460 |
#. type: TH |
| 461 |
#: debian-trixie |
| 462 |
#, no-wrap |
| 463 |
msgid "Linux man-pages 6.9.1" |
| 464 |
msgstr "" |
| 465 |
|
| 466 |
#. type: Plain text |
| 467 |
#: debian-trixie |
| 468 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 469 |
msgstr "" |
| 470 |
|
| 471 |
#. type: Plain text |
| 472 |
#: debian-trixie fedora-44 fedora-rawhide |
| 473 |
#, no-wrap |
| 474 |
msgid "" |
| 475 |
"B<size_t mbstowcs(wchar_t >I<dest>B<[restrict .>I<dsize>B<], const char *restrict >I<src>B<,>\n" |
| 476 |
"B< size_t >I<dsize>B<);>\n" |
| 477 |
msgstr "" |
| 478 |
|
| 479 |
#. type: Plain text |
| 480 |
#: debian-trixie fedora-44 fedora-rawhide |
| 481 |
#, no-wrap |
| 482 |
msgid "" |
| 483 |
"#include E<lt>locale.hE<gt>\n" |
| 484 |
"#include E<lt>stdio.hE<gt>\n" |
| 485 |
"#include E<lt>stdlib.hE<gt>\n" |
| 486 |
"#include E<lt>string.hE<gt>\n" |
| 487 |
"#include E<lt>wchar.hE<gt>\n" |
| 488 |
"#include E<lt>wctype.hE<gt>\n" |
| 489 |
"\\&\n" |
| 490 |
"int\n" |
| 491 |
"main(int argc, char *argv[])\n" |
| 492 |
"{\n" |
| 493 |
" size_t mbslen; /* Number of multibyte characters in source */\n" |
| 494 |
" wchar_t *wcs; /* Pointer to converted wide character string */\n" |
| 495 |
"\\&\n" |
| 496 |
" if (argc E<lt> 3) {\n" |
| 497 |
" fprintf(stderr, \"Usage: %s E<lt>localeE<gt> E<lt>stringE<gt>\\[rs]n\", argv[0]);\n" |
| 498 |
" exit(EXIT_FAILURE);\n" |
| 499 |
" }\n" |
| 500 |
"\\&\n" |
| 501 |
" /* Apply the specified locale. */\n" |
| 502 |
"\\&\n" |
| 503 |
" if (setlocale(LC_ALL, argv[1]) == NULL) {\n" |
| 504 |
" perror(\"setlocale\");\n" |
| 505 |
" exit(EXIT_FAILURE);\n" |
| 506 |
" }\n" |
| 507 |
"\\&\n" |
| 508 |
" /* Calculate the length required to hold argv[2] converted to\n" |
| 509 |
" a wide character string. */\n" |
| 510 |
"\\&\n" |
| 511 |
" mbslen = mbstowcs(NULL, argv[2], 0);\n" |
| 512 |
" if (mbslen == (size_t) -1) {\n" |
| 513 |
" perror(\"mbstowcs\");\n" |
| 514 |
" exit(EXIT_FAILURE);\n" |
| 515 |
" }\n" |
| 516 |
"\\&\n" |
| 517 |
" /* Describe the source string to the user. */\n" |
| 518 |
"\\&\n" |
| 519 |
" printf(\"Length of source string (excluding terminator):\\[rs]n\");\n" |
| 520 |
" printf(\" %zu bytes\\[rs]n\", strlen(argv[2]));\n" |
| 521 |
" printf(\" %zu multibyte characters\\[rs]n\\[rs]n\", mbslen);\n" |
| 522 |
"\\&\n" |
| 523 |
" /* Allocate wide character string of the desired size. Add 1\n" |
| 524 |
" to allow for terminating null wide character (L\\[aq]\\[rs]0\\[aq]). */\n" |
| 525 |
"\\&\n" |
| 526 |
" wcs = calloc(mbslen + 1, sizeof(*wcs));\n" |
| 527 |
" if (wcs == NULL) {\n" |
| 528 |
" perror(\"calloc\");\n" |
| 529 |
" exit(EXIT_FAILURE);\n" |
| 530 |
" }\n" |
| 531 |
"\\&\n" |
| 532 |
" /* Convert the multibyte character string in argv[2] to a\n" |
| 533 |
" wide character string. */\n" |
| 534 |
"\\&\n" |
| 535 |
" if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) -1) {\n" |
| 536 |
" perror(\"mbstowcs\");\n" |
| 537 |
" exit(EXIT_FAILURE);\n" |
| 538 |
" }\n" |
| 539 |
"\\&\n" |
| 540 |
" printf(\"Wide character string is: %ls (%zu characters)\\[rs]n\",\n" |
| 541 |
" wcs, mbslen);\n" |
| 542 |
"\\&\n" |
| 543 |
" /* Now do some inspection of the classes of the characters in\n" |
| 544 |
" the wide character string. */\n" |
| 545 |
"\\&\n" |
| 546 |
" for (wchar_t *wp = wcs; *wp != 0; wp++) {\n" |
| 547 |
" printf(\" %lc \", (wint_t) *wp);\n" |
| 548 |
"\\&\n" |
| 549 |
" if (!iswalpha(*wp))\n" |
| 550 |
" printf(\"!\");\n" |
| 551 |
" printf(\"alpha \");\n" |
| 552 |
"\\&\n" |
| 553 |
" if (iswalpha(*wp)) {\n" |
| 554 |
" if (iswupper(*wp))\n" |
| 555 |
" printf(\"upper \");\n" |
| 556 |
"\\&\n" |
| 557 |
" if (iswlower(*wp))\n" |
| 558 |
" printf(\"lower \");\n" |
| 559 |
" }\n" |
| 560 |
"\\&\n" |
| 561 |
" putchar(\\[aq]\\[rs]n\\[aq]);\n" |
| 562 |
" }\n" |
| 563 |
"\\&\n" |
| 564 |
" exit(EXIT_SUCCESS);\n" |
| 565 |
"}\n" |
| 566 |
msgstr "" |
| 567 |
|
| 568 |
#. type: TH |
| 569 |
#: fedora-44 fedora-rawhide |
| 570 |
#, no-wrap |
| 571 |
msgid "2024-07-23" |
| 572 |
msgstr "" |
| 573 |
|
| 574 |
#. type: TH |
| 575 |
#: fedora-44 fedora-rawhide |
| 576 |
#, no-wrap |
| 577 |
msgid "Linux man-pages 6.13" |
| 578 |
msgstr "" |
| 579 |
|
| 580 |
#. type: TH |
| 581 |
#: mageia-cauldron |
| 582 |
#, no-wrap |
| 583 |
msgid "Linux man-pages 6.17" |
| 584 |
msgstr "" |
| 585 |
|
| 586 |
#. type: TH |
| 587 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 588 |
#, no-wrap |
| 589 |
msgid "Linux man-pages (unreleased)" |
| 590 |
msgstr "" |