[Mono-bugs] [Bug 61530][Maj] New - XmlReader.ReadBase64 cannot decode Base64
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 14 Jul 2004 05:55:22 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by belanov@galaktika.ru.
http://bugzilla.ximian.com/show_bug.cgi?id=61530
--- shadow/61530 2004-07-14 05:55:22.000000000 -0400
+++ shadow/61530.tmp.31115 2004-07-14 05:55:22.000000000 -0400
@@ -0,0 +1,102 @@
+Bug#: 61530
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: FedoraCore 2
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: belanov@galaktika.ru
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: XmlReader.ReadBase64 cannot decode Base64
+
+BUG Report:
+mono XmlReader.ReadBase64 fails with error 'Invalid Base64 character' in
+mono/Linux but successfully reads in MS.NET.
+
+1.Description:
+My application reads xml files containing Base64 encoded documents in the
+<content> tags and extracts them. It was successfully tested
+on files with total size 7GB (approximately 700,000 docs) along with
+attached file sample.xml.These docs are mostly html files
+in Russian windows-1251 charset,but there are files in koi-8 and ascii
+charsets too. Initially, there was a Java app (not mine) for this
+purpose which uses JDK class XmlReader and the third-party open source
+Java module 'Base64' by Robert Harder for decoding( www.iharder.net ).
+It reads these files too. When I had compiled my app in mono/Linux it
+could not decode Base64 data from sample file (these data are docs
+in Russian koi-8r charset). When I had launched the same executable file
+(compiled in mono/Linux) in Windows, it worked well.
+Next, I had compiled app in MS.NET 1.1 for Windows. It had worked but
+when compiled file was used in mono/Linux, the app had failed too.
+
+2.Happens:
+- Allways in Linux, never in Windows (MS .NET).
+
+3.Test application:
+- base64_test.cs which contains the code taken from real application but
+only related to the problem.
+- sample.xml data file.
+
+4.Environment:
+Linux:
+- Fedora Core 2 with minor updates (kernel 2.6.7, wine 0.20040505 and
+others). Modules for used charsets support
+ were compiled into kernel (what is unlikely to be important matter
+though).
+- mono 1.0 packaged for FC2 - the initial release.
+Windows:
+- XP Pro, NET Framework SDK 1.1 (1.0 was good too).
+Additional tools:
+- not used.
+
+5.Compiling:
+ mcs -t:exe base64_test.cs (for mono)
+ csc -t:exe base64_test.cs (for MS.NET)
+
+6.Executing:
+ mono base64_test.exe (for mono)
+ base64_test (for MS.NET)
+ (file sample.xml must be in the same dir)
+
+
+7.Real output of the test application:
+
+- Correct result when working in MS.NET, compiled in mono/Linux or in
+MS.NET:
+**************************************************************************
+****
+Output file:./result-1.txt
+Document size:2811
+Output file:./result-2.txt
+Document size:5047
+**************************************************************************
+****
+
+
+- Error result when working in mono, compiled in mono/Linux or in MS.NET:
+**************************************************************************
+****
+Output file:./result-1.txt
+Conversion from Base64 failed at line:75 - Invalid Base64 character was
+found.
+Document size:0
+Output file:./result-2.txt
+Conversion from Base64 failed at line:194 - Invalid Base64 character was
+found.
+Document size:0
+**************************************************************************
+*****
+
+The error lines 75 and 194 are corresponds to </content> tags in the XML
+file.
+
+8.Attachmemnts:
+- base64_test.cs (demo)
+- sample.xml (data file for it).