Great info, thanks redwing!
This is for the benefit of anyone else who might be puzzled by mysterious ReplayGain behavior. I believe that MB is doing everything right, but other apps may be misbehaving.
I have done extensive testing today, reading and writing ID3v1, ID3v2 in UTF8 and UTF16, using a variety of tag editors, trying to narrow down the cause for some strange behavior:
1) Take a virgin mp3, perform volume analysis in MB
2) Play mp3 in XBMC (and WinAmp) and compare with original - files sound the same
3) Edit title in TagScanner - files still sound the same
4) Edit title in MP3Tag, file is now playing at expected volume level!
So, what is that MP3Tag is introducing into the file? Lower case tag names.
In XBMC and Winamp, if the tag names REPLAYGAIN_TRACK_PEAK and REPLAYGAIN_TRACK_GAIN are stored in upper case, then the RG info is not respected during playback. I used a hex editor to change the tag name from upper to lower case (to "replaygain_track_peak" and "replaygain_track_gain") and the file played correctly.
A little googling reveals that this same issue has crept up over the years with foobar, VLC, Sonos, and others. The standard suggests upper case, but many implementations are case sensitive to lower case. Lame!
I did look through the various tag options in MB.... And though I don't see a setting for tag case, I am thinking there may be some double-secret setting I could tweak that would enable me to write lower case tag names in the tags. At least until I convince the XBMC guys to tweak their code
Would this be possible?