You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Oleg Tkachenko <ol...@multiconn.com> on 2002/07/13 22:57:46 UTC

[PATCH] TXTRenderer output encoding

Hello!

As Torsten Straube pointed out that would be nice to have a possibility 
to set TXTRenderer output encoding. I like the idea and here is my 
proposed patch. I have added new TXTRenderer option "txt.encoding", 
which could be set either from command line:

fop.bat d:\table.fo -txt d:\table.txt -d -txt.encoding Windows-1251

or from java code using TXTRenderer's setOptions(Hashtable) method.
In the case of unsupported encoding TXTStream escapes back to UTF-8.

-- 
Oleg Tkachenko
Multiconn International, Israel

Re: [PATCH] TXTRenderer output encoding

Posted by Christian Geisert <ch...@isu-gmbh.de>.
J.Pietschmann schrieb:
> Oleg Tkachenko wrote:
> 
>> Well, encoding-related code looks fine for me, but I cannot build fop 
>> in cvs due to Hashtable/HashMap changes:
> 
> Oops, didn't clean the build directory before the test build.
> It should be fixed now.

It isn't (build.sh clean compile)

     [javac] 
/home/chrisg/oss/fop-maint/xml-fop/build/src/org/apache/fop/tools/TestConverter.java:243: 
Incompatible type for method. Can't convert java.util.Hashtable to 
java.util.HashMap.
     [javac]             driver.getRenderer().setOptions(rendererOptions);
     [javac]                                             ^
     [javac] 
/home/chrisg/oss/fop-maint/xml-fop/build/src/org/apache/fop/tools/anttasks/Fop.java:354: 
Incompatible type for method. Can't convert java.util.Hashtable to 
java.util.HashMap.
     [javac]             driver.getRenderer().setOptions(rendererOptions);
     [javac]                                             ^
     [javac] 2 errors

BUILD FAILED


Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: [PATCH] TXTRenderer output encoding

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Oleg Tkachenko wrote:
> Well, encoding-related code looks fine for me, but I cannot build fop in 
> cvs due to Hashtable/HashMap changes:

Oops, didn't clean the build directory before the test build.
It should be fixed now.

J.Pietschmann



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: [PATCH] TXTRenderer output encoding

Posted by Oleg Tkachenko <ol...@multiconn.com>.
J.Pietschmann wrote:

> Ok, commited to the maintenance branch. I added usage
> info and moved the check for a valid encoding somewhere
> else and provided a warning in case the encoding is
> invalid. PPlease test.
Well, encoding-related code looks fine for me, but I cannot build fop in cvs 
due to Hashtable/HashMap changes:

     [javac] Compiling 714 source files to D:\fop\fopx\build\classes
     [javac] D:\fop\fopx\build\src\org\apache\fop\apps\CommandLineStarter.java:68
: Incompatible type for method. Can't convert java.util.HashMap to java.util.Has
htable.
     [javac]               commandLineOptions.getRendererOptions());
     [javac]                                                    ^
     [javac] 1 error

I believe you forgot to modify Renderer's setOptions(java.util.Hashtable 
options) method.

-- 
Oleg Tkachenko
Multiconn International, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: [PATCH] TXTRenderer output encoding

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Oleg Tkachenko wrote:
> As Torsten Straube pointed out that would be nice to have a possibility 
> to set TXTRenderer output encoding. I like the idea and here is my 
> proposed patch.

Ok, commited to the maintenance branch. I added usage
info and moved the check for a valid encoding somewhere
else and provided a warning in case the encoding is
invalid. PPlease test.

I canät commit it to the head as the TXTRenderer seems
to be in a major overhaul there.

J.Pietschmann



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org