mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-13 08:01:33 +01:00
add comment re: stream format non-change for utf-8
This commit is contained in:
parent
615603b66b
commit
e8825e119c
1 changed files with 7 additions and 4 deletions
|
@ -242,10 +242,6 @@ dict_writeToStream( const DictionaryCtxt* dict, XWStreamCtxt* stream )
|
|||
XP_U16 ii, nSpecials;
|
||||
XP_U16 maxCountBits, maxValueBits;
|
||||
|
||||
/* Need to keep format identical for non-utf so new versions can play
|
||||
against old using non-UTF8 dicts. The old ones won't even recognize
|
||||
UTF8 dicts as dicts, so there shouldn't be any attempts to connect with
|
||||
them having one open. */
|
||||
stream_putBits( stream, 6, dict->nFaces );
|
||||
|
||||
for ( ii = 0; ii < dict->nFaces*2; ii+=2 ) {
|
||||
|
@ -273,6 +269,13 @@ dict_writeToStream( const DictionaryCtxt* dict, XWStreamCtxt* stream )
|
|||
stream_putBits( stream, maxValueBits, dict->countsAndValues[ii+1] );
|
||||
}
|
||||
|
||||
/* Stream format of the faces is unchanged: chars run together, which
|
||||
* happens to equal utf-8 for ascii. But now there may be more than one
|
||||
* byte per face. Old code assumes that, but compatibility is ensured by
|
||||
* the caller which will not accept an incoming message if the version's
|
||||
* too new. And utf-8 dicts are flagged as newer by the sender.
|
||||
*/
|
||||
|
||||
XP_UCHAR buf[64];
|
||||
XP_U16 nBytes = sizeof(buf);
|
||||
ucharsToNarrow( dict, buf, &nBytes );
|
||||
|
|
Loading…
Reference in a new issue