Donate Share

SchemaSpy

Tracker: Bugs

5 XML file is not a valid UTF8 - ID: 1487385
Last Update: Comment added ( sf-robot )


in Main.java(323):

out = new LineWriter(new FileWriter(new File
(outputDir, xmlName + ".xml")), 24 * 1024);

The FileWriter use default encoding and not UTF8.

If you have some remarks attribute with french
characters like 'é', the XML file is invalid.

If you use the other constuctor for FileWriter, all
will be right I think.

out = new LineWriter(new FileOutputStream(new File
(outputDir, xmlName + ".xml")));


Many thanks for your great work!

Bernard



Bernard D'Havé ( bdhave ) - 2006-05-12 13:03

5

Closed

None

John Currier

Invalid results

None

Public


Comments ( 5 )

Date: 2006-10-20 02:20
Sender: sf-robotSourceForge.net Site Admin

Logged In: YES
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2006-10-05 04:59
Sender: johncurrierProject AdminAccepting Donations

Logged In: YES
user_id=1264584

Fixed in 3.1.0.

John


Date: 2006-05-14 19:22
Sender: johncurrierProject AdminAccepting Donations

Logged In: YES
user_id=1264584

Cool. Note that SourceForge's CVS has been down for quite a
while now, so the changes won't show up for a bit...

Thanks,
John


Date: 2006-05-14 07:17
Sender: bdhave

Logged In: YES
user_id=94842

The generated pages where column remarks contains the
char 'é' display right, but I known that in mine projects
we use OutputStream with UTF8 encoding also. We never use
a Writer for UTF8 writing.

But you write HTML with the jvm encoding I think. See the
following extract:

<meta HTTP-EQUIV='Content-Type' CONTENT='text/html;
charset=ISO-8859-1'>

No need to change it!

Thanks for your time,
Bernard




Date: 2006-05-14 01:58
Sender: johncurrierProject AdminAccepting Donations

Logged In: YES
user_id=1264584

Yes, you're correct Bernard. The LineWriter constructor
that takes an OutputStream will use UTF8 encoding. I didn't
realize that XML required it.

Should the generated HTML pages also be in UTF8?

Thanks,
John


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Pending 2006-10-20 02:20 sf-robot
close_date 2006-10-05 04:59 2006-10-20 02:20 sf-robot
status_id Open 2006-10-05 04:59 johncurrier
close_date - 2006-10-05 04:59 johncurrier