Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minor updates to the docs.
  • Loading branch information
icculus committed Mar 11, 2012
1 parent df3c281 commit 7a8e3de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
3 changes: 0 additions & 3 deletions docs/TODO.txt
Expand Up @@ -18,9 +18,6 @@ From http://icculus.org/pipermail/physfs/2009-March/000698.html ...
you have to pick a translation at compile time, which isn't too useful. It
might be nice to have real error codes for apps instead of just error
messages for humans, too.
- UTF-16 support. 2.0.0 only handles UCS-2, which is most of the work, but
leaves out the "surrogate" codepoints. UTF-16 is a superset of UCS-2.
Older Windows using Unicode used UCS-2, newer Windows platforms use UTF-16.
- Add an API to expose a file's extended attributes to the application?
- Deprecate PHYSFS_setSaneConfig(). It really should have been in the extras
directory.
Expand Down
25 changes: 13 additions & 12 deletions src/physfs.h
Expand Up @@ -170,9 +170,9 @@
* "UCS-2 encoding"). Any modern Windows uses UTF-16, which is two bytes
* per character for most characters, but some characters are four. You
* should convert them to UTF-8 before handing them to PhysicsFS with
* PHYSFS_utf8FromUcs2() or PHYSFS_utf8FromUtf16(). If you're using Unix or
* Mac OS X, your wchar_t strings are four bytes per character ("UCS-4
* encoding"). Use PHYSFS_utf8FromUcs4(). Mac OS X can give you UTF-8
* PHYSFS_utf8FromUtf16(), which handles both UTF-16 and UCS-2. If you're
* using Unix or Mac OS X, your wchar_t strings are four bytes per character
* ("UCS-4 encoding"). Use PHYSFS_utf8FromUcs4(). Mac OS X can give you UTF-8
* directly from a CFString or NSString, and many Unixes generally give you C
* strings in UTF-8 format everywhere. If you have a single-byte high ASCII
* charset, like so-many European "codepages" you may be out of luck. We'll
Expand Down Expand Up @@ -209,11 +209,11 @@
*
* Other stuff:
*
* Please see the file LICENSE.txt in the source's root directory for licensing
* and redistribution rights.
* Please see the file LICENSE.txt in the source's "docs" directory for
* licensing and redistribution rights.
*
* Please see the file CREDITS.txt in the source's root directory for a more or
* less complete list of who's responsible for this.
* Please see the file CREDITS.txt in the source's "docs" directory for
* a more or less complete list of who's responsible for this.
*
* \author Ryan C. Gordon.
*/
Expand Down Expand Up @@ -2423,7 +2423,8 @@ PHYSFS_DECL void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst,
*
* UCS-2 strings are 16-bits per character: \c TCHAR on Windows, when building
* with Unicode support. Please note that modern versions of Windows use
* UTF-16, not UCS-2. You almost certainly want PHYSFS_utf8FromUtf16() instead.
* UTF-16, which is an extended form of UCS-2, and not UCS-2 itself. You
* almost certainly want PHYSFS_utf8FromUtf16() instead.
*
* To ensure that the destination buffer is large enough for the conversion,
* please allocate a buffer that is double the size of the source buffer.
Expand Down Expand Up @@ -2452,8 +2453,9 @@ PHYSFS_DECL void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst,
*
* UCS-2 strings are 16-bits per character: \c TCHAR on Windows, when building
* with Unicode support. Please note that modern versions of Windows use
* UTF-16, not UCS-2. You almost certainly want PHYSFS_utf8ToUtf16() instead,
* but you need to understand how that changes things, too.
* UTF-16, which is an extended form of UCS-2, and not UCS-2 itself. You
* almost certainly want PHYSFS_utf8ToUtf16() instead, but you need to
* understand how that changes things, too.
*
* To ensure that the destination buffer is large enough for the conversion,
* please allocate a buffer that is double the size of the source buffer.
Expand All @@ -2477,8 +2479,7 @@ PHYSFS_DECL void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst,
* \fn void PHYSFS_utf8FromLatin1(const char *src, char *dst, PHYSFS_uint64 len)
* \brief Convert a UTF-8 string to a Latin1 string.
*
* Latin1 strings are 8-bits per character: a popular "high ASCII"
* encoding.
* Latin1 strings are 8-bits per character: a popular "high ASCII" encoding.
*
* To ensure that the destination buffer is large enough for the conversion,
* please allocate a buffer that is double the size of the source buffer.
Expand Down

0 comments on commit 7a8e3de

Please sign in to comment.