[Mono-list] Re: UTF7Encoding, not working correctly ?
Timothy Parez
tpsoftware@users.sourceforge.net
19 Mar 2003 10:21:46 +0100
--=-yCH4VbLwe2FkTklxKVbW
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Hello,
I added some test to the code:
Before even using the UTF7Encoding I tried persisting the
MemoryStream to file:
FileStream x =3D new FileStream("out.xml",FileMode.Create);
x.Write(xmlStream.ToArray(),0,xmlStream.ToArray().Length);
x.Close();
//The type of xmlStream is MemoryStream
I added the results of both the mono and .net runtime as file
attachment. As you can see it also messed up.
Thnx.
Timothy.
Op wo 19-03-2003, om 03:55 schreef ginga@kit.hi-ho.ne.jp:
> Hello,
>=20
> > I'm creating a class library which I want to use with both the .NET and
> > Mono runtime. Now when I run the current version (development version),
> > with the .NET runtime everything works fine, the application gets some
> > data from a game server and returns UTF7 encoded XML. However if I run
> > the same test using the mono framework on Windows or Linux the XML is
> > completely messed up.
>=20
> It may be Encoding problem or XML problem (it checks xml declaration,
> while actual encoding is indeterminant). Yould you please
> (1)check the given utf-7 stream is readable with other classes e.g.
> StreamReader and (2)post such xml you checked or mail me if it is
> not small? I tried 200kb or more utf-7-ed Japanese text xml on
> Windows and got correct result (nunit tests with mscorlib).
>=20
> Thanks,
> Atsushi Eno
>=20
--=-yCH4VbLwe2FkTklxKVbW
Content-Disposition: attachment; filename=out-dotnet.xml
Content-Type: text/xml; name=out-dotnet.xml; charset=us-ascii
Content-Transfer-Encoding: 7bit
+ADw-?xml version+AD0AIg-1.0+ACI- encoding+AD0AIg-utf-7+ACI- standalone+AD0AIg-yes+ACI-?+AD4APA-Q3Plugs.NET+AD4APA-Query type+AD0AIg-infoRequest+ACI- protocol+AD0AIg-Quake3+ACIAPgA8-Server ipadress+AD0AIg-195.130.132.153+ACI- port+AD0AIg-27960+ACI- /+AD4APA-Rules count+AD0AIg-17+ACIAPgA8-rule name+AD0AIg-protocol+ACIAPgA8ACEAWw-CDATA+AFs-60+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-hostname+ACIAPgA8ACEAWw-CDATA+AFs--+AD0-Telenet 1 +AF4-1(OSP v0.82)+AF4-7+AD0-- +AF4-1+AFs-All maps+AF0AXQBdAD4APA-/rule+AD4APA-rule name+AD0AIg-mapname+ACIAPgA8ACEAWw-CDATA+AFs-mp+AF8-ice+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-clients+ACIAPgA8ACEAWw-CDATA+AFs-0+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-sv+AF8-maxclients+ACIAPgA8ACEAWw-CDATA+AFs-16+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-gametype+ACIAPgA8ACEAWw-CDATA+AFs-6+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-pure+ACIAPgA8ACEAWw-CDATA+AFs-1+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-maxPing+ACIAPgA8ACEAWw-CDATA+AFs-450+AF0AXQA+ADw-/rule+AD
4APA-rule name+AD0AIg-game+ACIAPgA8ACEAWw-CDATA+AFs-osp+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-sv+AF8-allowAnonymous+ACIAPgA8ACEAWw-CDATA+AFs-0+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-gameskill+ACIAPgA8ACEAWw-CDATA+AFs-3+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-friendlyFire+ACIAPgA8ACEAWw-CDATA+AFs-1+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-maxlives+ACIAPgA8ACEAWw-CDATA+AFs-0+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-tourney+ACIAPgA8ACEAWw-CDATA+AFs-0+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-punkbuster+ACIAPgA8ACEAWw-CDATA+AFs-1+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-gamename+ACIAPgA8ACEAWw-CDATA+AFs-wolfmp+AF0AXQA+ADw-/rule+AD4APA-rule name+AD0AIg-g+AF8-antilag+ACIAPgA8ACEAWw-CDATA+AFs-0+AF0AXQA+ADw-/rule+AD4APA-/Rules+AD4APA-/Query+AD4APA-/Q3Plugs.NET+AD4-
--=-yCH4VbLwe2FkTklxKVbW
Content-Disposition: attachment; filename=out-mono.xml
Content-Type: text/xml; name=out-mono.xml; charset=us-ascii
Content-Transfer-Encoding: 7bit
+ADw-?xml version+AD0AIg-1.0+ACI- encoding+AD0AIg-utf-7+ACI- standalone+AD0AIg-yes+ACI-?+AD4-+ADw-Q3Plugs.NET+AD4-+ADw-Query type+AD0AIg-infoRequest+ACI- protocol+AD0AIg-Quake3+ACI-+AD4-+ADw-Server ipadress+AD0AIg-195.130.132.153+ACI- port+AD0AIg-27960+ACI- /+AD4-+BExAAA-Rules count+BE0BJhAA17+BDJAAARO+AAAETEAArule name+BE0BJhAAprotocol+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-60+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAhostname+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs--+BE0AAA-Telenet 1 +BG4AAA-1(OSP v0.82)+BG4AAA-7+BE0AAA-- +BG4AAA-1+BGtAAA-All maps+BG0BYRCe+-AD4-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAmapname+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-mp+BG8AAA-ice+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAclients+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-0+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAsv+BG8AAA-maxclients+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-16+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAgametype+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-6+BG0BYRBA+-+BExAAA
-/rule+BE4AAARM+QAA-rule name+BE0BJhAApure+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-1+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAmaxPing+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-450+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAgame+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-osp+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAsv+BG8AAA-allowAnonymous+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-0+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAgameskill+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-3+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAfriendlyFire+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-1+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAmaxlives+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-0+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAtourney+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-0+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAApunkbuster+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-1+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAgamename+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-wolfmp+BG0B
YRBA+-+BExAAA-/rule+BE4AAARM+QAA-rule name+BE0BJhAAg+BG8AAA-antilag+BDJAAARO+AAAETEEl+EJwMQFQE+-AFs-0+BG0BYRBA+-+BExAAA-/rule+BE4AAARM+QAA-/Rules+BE4AAA-+ADw-/Query+AD4-+ADw-/Q3Plugs.NET+AD4-
--=-yCH4VbLwe2FkTklxKVbW--