src/physfs.h
changeset 1092 12c87d886a75
parent 1091 0a103bf74f1c
child 1094 aa12a958cc47
equal deleted inserted replaced
1091:0a103bf74f1c 1092:12c87d886a75
  2318  *  never uses more than 32-bits per character, so while it may shrink a UCS-4
  2318  *  never uses more than 32-bits per character, so while it may shrink a UCS-4
  2319  *  string, it will never expand it.
  2319  *  string, it will never expand it.
  2320  *
  2320  *
  2321  * Strings that don't fit in the destination buffer will be truncated, but
  2321  * Strings that don't fit in the destination buffer will be truncated, but
  2322  *  will always be null-terminated and never have an incomplete UTF-8
  2322  *  will always be null-terminated and never have an incomplete UTF-8
  2323  *  sequence at the end.
  2323  *  sequence at the end. If the buffer length is 0, this function does nothing.
  2324  *
  2324  *
  2325  *   \param src Null-terminated source string in UCS-4 format.
  2325  *   \param src Null-terminated source string in UCS-4 format.
  2326  *   \param dst Buffer to store converted UTF-8 string.
  2326  *   \param dst Buffer to store converted UTF-8 string.
  2327  *   \param len Size, in bytes, of destination buffer.
  2327  *   \param len Size, in bytes, of destination buffer.
  2328  */
  2328  */
  2340  *  UTF-8 uses from one to four bytes per character, but UCS-4 always uses
  2340  *  UTF-8 uses from one to four bytes per character, but UCS-4 always uses
  2341  *  four, so an entirely low-ASCII string will quadruple in size!
  2341  *  four, so an entirely low-ASCII string will quadruple in size!
  2342  *
  2342  *
  2343  * Strings that don't fit in the destination buffer will be truncated, but
  2343  * Strings that don't fit in the destination buffer will be truncated, but
  2344  *  will always be null-terminated and never have an incomplete UCS-4
  2344  *  will always be null-terminated and never have an incomplete UCS-4
  2345  *  sequence at the end.
  2345  *  sequence at the end. If the buffer length is 0, this function does nothing.
  2346  *
  2346  *
  2347  *   \param src Null-terminated source string in UTF-8 format.
  2347  *   \param src Null-terminated source string in UTF-8 format.
  2348  *   \param dst Buffer to store converted UCS-4 string.
  2348  *   \param dst Buffer to store converted UCS-4 string.
  2349  *   \param len Size, in bytes, of destination buffer.
  2349  *   \param len Size, in bytes, of destination buffer.
  2350  */
  2350  */
  2363  *  UTF-8 never uses more than 32-bits per character, so while it may shrink
  2363  *  UTF-8 never uses more than 32-bits per character, so while it may shrink
  2364  *  a UCS-2 string, it may also expand it.
  2364  *  a UCS-2 string, it may also expand it.
  2365  *
  2365  *
  2366  * Strings that don't fit in the destination buffer will be truncated, but
  2366  * Strings that don't fit in the destination buffer will be truncated, but
  2367  *  will always be null-terminated and never have an incomplete UTF-8
  2367  *  will always be null-terminated and never have an incomplete UTF-8
  2368  *  sequence at the end.
  2368  *  sequence at the end. If the buffer length is 0, this function does nothing.
  2369  *
  2369  *
  2370  * Please note that UCS-2 is not UTF-16; we do not support the "surrogate"
  2370  * Please note that UCS-2 is not UTF-16; we do not support the "surrogate"
  2371  *  values at this time.
  2371  *  values at this time.
  2372  *
  2372  *
  2373  *   \param src Null-terminated source string in UCS-2 format.
  2373  *   \param src Null-terminated source string in UCS-2 format.
  2389  *  UTF-8 uses from one to four bytes per character, but UCS-2 always uses
  2389  *  UTF-8 uses from one to four bytes per character, but UCS-2 always uses
  2390  *  two, so an entirely low-ASCII string will double in size!
  2390  *  two, so an entirely low-ASCII string will double in size!
  2391  *
  2391  *
  2392  * Strings that don't fit in the destination buffer will be truncated, but
  2392  * Strings that don't fit in the destination buffer will be truncated, but
  2393  *  will always be null-terminated and never have an incomplete UCS-2
  2393  *  will always be null-terminated and never have an incomplete UCS-2
  2394  *  sequence at the end.
  2394  *  sequence at the end. If the buffer length is 0, this function does nothing.
  2395  *
  2395  *
  2396  * Please note that UCS-2 is not UTF-16; we do not support the "surrogate"
  2396  * Please note that UCS-2 is not UTF-16; we do not support the "surrogate"
  2397  *  values at this time.
  2397  *  values at this time.
  2398  *
  2398  *
  2399  *   \param src Null-terminated source string in UTF-8 format.
  2399  *   \param src Null-terminated source string in UTF-8 format.
  2415  *  UTF-8 expands latin1 codepoints over 127 from 1 to 2 bytes, so the string
  2415  *  UTF-8 expands latin1 codepoints over 127 from 1 to 2 bytes, so the string
  2416  *  may grow in some cases.
  2416  *  may grow in some cases.
  2417  *
  2417  *
  2418  * Strings that don't fit in the destination buffer will be truncated, but
  2418  * Strings that don't fit in the destination buffer will be truncated, but
  2419  *  will always be null-terminated and never have an incomplete UTF-8
  2419  *  will always be null-terminated and never have an incomplete UTF-8
  2420  *  sequence at the end.
  2420  *  sequence at the end. If the buffer length is 0, this function does nothing.
  2421  *
  2421  *
  2422  * Please note that we do not supply a UTF-8 to Latin1 converter, since Latin1
  2422  * Please note that we do not supply a UTF-8 to Latin1 converter, since Latin1
  2423  *  can't express most Unicode codepoints. It's a legacy encoding; you should
  2423  *  can't express most Unicode codepoints. It's a legacy encoding; you should
  2424  *  be converting away from it at all times.
  2424  *  be converting away from it at all times.
  2425  *
  2425  *