This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes XML / Oracle / PrintWriter Issue... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "XML / Oracle / PrintWriter Issue..." Watch "XML / Oracle / PrintWriter Issue..." New topic
Author

XML / Oracle / PrintWriter Issue...

Matt Ghiold
Ranch Hand

Joined: Feb 24, 2002
Posts: 213
Hey guys,
Here is my dillema, I am making a JDBC connection to an oracle database and taking my result set and building an XML file using a PrintWriter. Everything works very well, except for one issue. The oracle database stores bullet characters inside some of the fields, and when the PrintWriter class attempts to write them I get ? marks, because the PrintWriter, does not know how to represent to bullets in a character form as they are not normal character values that can be represented on the native file system.
I think if I change it to a Printstream I can fix the issue by just writting out native bytes, the problem with this solution is it involves a major rewrite. Does anyone out there have another idea to make this work with and be able to get back the bullet characters as bullets that can be displayed in html? I have also considerered using perl.ora tools, but unfortunaly you can not to a search and replace on a ? mark, because it may be a valid ? mark, and not supposed to be a bullet.
Thoughts ideas would be very welcome.
Thanks,
Matt
[ March 13, 2002: Message edited by: Matt Ghiold ]

-Matt<br /> SCJP2<br /> SCJD
Thomas Smets
Ranch Hand

Joined: Dec 11, 2001
Posts: 111
Is the porblem still there with blobs / clobs ?
Have you setup you Oracle to support Unicodes ?
The way you express teh proble it's not solvable - as such - on the java side alone !
May be could you try to give abroader idea of the parameter we could influence ?
Like wrtting the element sin the file in ASCII replacing the bullet by a String like [bullet] of some sort ...
There is dozen of io classes that could be helpfull in atomating that,you know !
Thomas,


Thomas Smets
Just another developper
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML / Oracle / PrintWriter Issue...