commit wj carpenter''s xml/pref patch. it works ok for me.
CVS:
----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS:    src/af/util/xp/ut_string.cpp src/af/util/xp/ut_string.h
CVS:    src/af/xap/xp/xap_Prefs.cpp
CVS:    src/af/xap/xp/xap_Prefs_SchemeIds.h src/wp/ap/xp/ap_Prefs.cpp
CVS:    src/wp/ap/xp/ap_Prefs_SchemeIds.h
CVS:
----------------------------------------------------------------------


On Tue, 4 Jul 2000, WJCarpenter wrote:

> The attached patch is from your "Department of You Didn't Even Know
> You Had This Problem".  It corrects two related problems in the
> processing of preferences.  All changes are XP.  The patch is a diff
> against the 070300 nightly source tarball.
> 
> 1.  Because the preferences file(s) are read and parsed with expat,
> XML encoding is honored/enforced on attribute values.  For example,
> the string "&" would be turned into "&".  When preferences are
> written by applications, the encoding was not being applied.  In other 
> words, round-tripping wouldn't work and it would be possible for a
> user-supplied (heh, or even developer-supplied) preference value to
> create a parsing problem in the preferences file.  THIS PATCH SUPPLIES 
> THE XML CHARACTER ENCODING WHEN PREFERENCES ARE WRITTEN.  The encoding 
> is done for the four standard XML required characters, characters with 
> values less than ' ', and characters greater than 127 (the latter to
> preserve 7-bit cleanliness).
> 
> 2.  Default values (supplied by developers in the cross-application
> and application-specific header files) are treated as if they have
> been read from some other-worldly preferences file, but they haven't
> undergone XML parsing like values that really have been read from
> files.  For consistency and because it is tricky to put UTF8 encodings
> for high-valued characters in C++ string literals, XML decoding should
> be done on those default strings when they are first encountered.
> THIS PATCH PERFORMS XML DECODING ON PREFERENCE DEFAULT VALUES DURING
> INITIALIZATION.  (Quick show of hands... who knew that Abi preference
> values were UTF8 and not just ASCII?)
> 
> In case anyone is wondering and can't guess, these changes don't
> really matter for the current list of preferences and their defaults,
> but upcoming preference values for glyph remapping (smart quotes, et
> al) depend on these changes.
> -- 
> [EMAIL PROTECTED] (WJCarpenter)    PGP 0x91865119
> 38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3
> 
> 




Reply via email to