You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Pedro Alves <pe...@neraka.no-ip.org> on 2005/07/28 18:37:31 UTC

SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860



Hello. I'm having this error when transforming a xml doc with a xslt:

SAXException: Attempt to output character of integral value 231 that is
not represented in specified output encoding of cp860


I have <xsl:output encoding="cp860" method="text"/>


cp860 is the code page for Portuguese language, and 231 is 'ç', one of the
most widely use characters here. (I get this error whatever the special
character I use).


Is this a feature? Outputting in 8859-1 or utf works fine, but I need that
encoding to send the info to a 3rd party app that only works that way.


Thanks

ps: sorry if this messas was supposed to be sent to non-dev list

-- 
Pedro Alves

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Thu, Aug 04, 2005 at 03:44:24PM -0400, Brian Minchau wrote:
> Pedro,
> 
> Issue 1799 is a different problem, its error message is this:
>     >> Attempt to output character of integral value 235 that is not
> represented in specified output encoding of .
> 
> If you look carefully you will see that the message does not specify which
> encoding. I think that 1799 was an internal error to do with temporary
> output trees which have no associated encoding.
> 
> I think your problem is already reported in issue 2084
> in http://issues.apache.org/jira/browse/XALANJ-2084
> you can see that the error message similar to the problem you see, with the
> name of the encoding.
> 
> Issue 2084 points to 2087 as having  the fix.  That fix was applied to the
> codebase yesterday by myself. It was a last minute patch going into the 2.7
> release, which is expected to be released very soon (any day now). So you
> can watch this mailing list for the announcement.
> 
> The fix in 2087 is about a bug in the code that figures out if a given
> character is in the encoding or not. Of course if unicode code point 231 is
> not in cp860 this problem won't go away.
> 


Sorry, mate, I didn't understand one thing. 2084 points to 2087, and you
say its fixed.

I downloaded the cvs version this afternoon and tried it, and still have
problems (in fact, more problems than before). I attacted a test case and
a comment for 2087.

Sorry if I misunderstood you in some way


best regards


-- 
Pedro Alves
pedro.alves@zmail.pt

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Brian Minchau <mi...@ca.ibm.com>.
Pedro,

Issue 1799 is a different problem, its error message is this:
    >> Attempt to output character of integral value 235 that is not
represented in specified output encoding of .

If you look carefully you will see that the message does not specify which
encoding. I think that 1799 was an internal error to do with temporary
output trees which have no associated encoding.

I think your problem is already reported in issue 2084
in http://issues.apache.org/jira/browse/XALANJ-2084
you can see that the error message similar to the problem you see, with the
name of the encoding.

Issue 2084 points to 2087 as having  the fix.  That fix was applied to the
codebase yesterday by myself. It was a last minute patch going into the 2.7
release, which is expected to be released very soon (any day now). So you
can watch this mailing list for the announcement.

The fix in 2087 is about a bug in the code that figures out if a given
character is in the encoding or not. Of course if unicode code point 231 is
not in cp860 this problem won't go away.


- Brian
- - - - - - - - - - - - - - - - - - - -
Brian Minchau
XSLT Development, IBM Toronto



                                                                           
             Pedro Alves                                                   
             <pedro@neraka.no-                                             
             ip.org>                                                    To 
                                       xalan-dev@xml.apache.org            
             08/04/2005 11:51                                           cc 
             AM                                                            
                                                                   Subject 
                                       Re: SAXException: Attempt to output 
             Please respond to         character of integral value 231     
                 xalan-dev             that is not represented in          
                                       specified output encoding of cp860  
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




On Thu, Aug 04, 2005 at 08:12:05AM -0700, david_n_bertoni@us.ibm.com wrote:
> > I got no answers at all. Should I fill this as a bug?
> >
> >
> > Thanks
>
> Since the bug is not fixed until Xalan-J 2.7, and you're using 2.6, why
> would you expect to have the fix?
>
> Dave



The first link you gave me was
http://issues.apache.org/jira/browse/XALANJ-1799
which is marked as closed and fixed. The last comment says:


Comment by Oleg Lyebyedyev [04/Mar/04 09:53 AM]
Update to 2.6.0 fixes this bug. Thank you.


So I thought it was the solution to my problem. I just followed the
duplicate references and got to 1710 (you already replied this to me but I
was not familiar with jira and didn't fully understand it).


Thanks for your time







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

--
Pedro Alves
pedro.alves@zmail.pt

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




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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Brian Minchau <mi...@ca.ibm.com>.
Pedro,

Issue 1799 is a different problem, its error message is this:
    >> Attempt to output character of integral value 235 that is not
represented in specified output encoding of .

If you look carefully you will see that the message does not specify which
encoding. I think that 1799 was an internal error to do with temporary
output trees which have no associated encoding.

I think your problem is already reported in issue 2084
in http://issues.apache.org/jira/browse/XALANJ-2084
you can see that the error message similar to the problem you see, with the
name of the encoding.

Issue 2084 points to 2087 as having  the fix.  That fix was applied to the
codebase yesterday by myself. It was a last minute patch going into the 2.7
release, which is expected to be released very soon (any day now). So you
can watch this mailing list for the announcement.

The fix in 2087 is about a bug in the code that figures out if a given
character is in the encoding or not. Of course if unicode code point 231 is
not in cp860 this problem won't go away.


- Brian
- - - - - - - - - - - - - - - - - - - -
Brian Minchau
XSLT Development, IBM Toronto



                                                                           
             Pedro Alves                                                   
             <pedro@neraka.no-                                             
             ip.org>                                                    To 
                                       xalan-dev@xml.apache.org            
             08/04/2005 11:51                                           cc 
             AM                                                            
                                                                   Subject 
                                       Re: SAXException: Attempt to output 
             Please respond to         character of integral value 231     
                 xalan-dev             that is not represented in          
                                       specified output encoding of cp860  
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




On Thu, Aug 04, 2005 at 08:12:05AM -0700, david_n_bertoni@us.ibm.com wrote:
> > I got no answers at all. Should I fill this as a bug?
> >
> >
> > Thanks
>
> Since the bug is not fixed until Xalan-J 2.7, and you're using 2.6, why
> would you expect to have the fix?
>
> Dave



The first link you gave me was
http://issues.apache.org/jira/browse/XALANJ-1799
which is marked as closed and fixed. The last comment says:


Comment by Oleg Lyebyedyev [04/Mar/04 09:53 AM]
Update to 2.6.0 fixes this bug. Thank you.


So I thought it was the solution to my problem. I just followed the
duplicate references and got to 1710 (you already replied this to me but I
was not familiar with jira and didn't fully understand it).


Thanks for your time







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

--
Pedro Alves
pedro.alves@zmail.pt

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




Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Thu, Aug 04, 2005 at 08:12:05AM -0700, david_n_bertoni@us.ibm.com wrote:
> > I got no answers at all. Should I fill this as a bug?
> > 
> > 
> > Thanks
> 
> Since the bug is not fixed until Xalan-J 2.7, and you're using 2.6, why 
> would you expect to have the fix?
> 
> Dave



The first link you gave me was http://issues.apache.org/jira/browse/XALANJ-1799
which is marked as closed and fixed. The last comment says:


Comment by Oleg Lyebyedyev [04/Mar/04 09:53 AM]
Update to 2.6.0 fixes this bug. Thank you.


So I thought it was the solution to my problem. I just followed the
duplicate references and got to 1710 (you already replied this to me but I
was not familiar with jira and didn't fully understand it).


Thanks for your time







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

-- 
Pedro Alves
pedro.alves@zmail.pt

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by da...@us.ibm.com.
> I got no answers at all. Should I fill this as a bug?
> 
> 
> Thanks

Since the bug is not fixed until Xalan-J 2.7, and you're using 2.6, why 
would you expect to have the fix?

Dave


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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Pedro Alves <pe...@neraka.no-ip.org>.

I got no answers at all. Should I fill this as a bug?


Thanks


On Wed, Aug 03, 2005 at 12:17:18PM +0100, Pedro Alves wrote:
> On Fri, Jul 29, 2005 at 08:38:28AM -0700, david_n_bertoni@us.ibm.com wrote:
> > 
> > http://xml.apache.org/xalan-j/faq.html#faq-N1005D
> > http://xml.apache.org/xalan-j/faq.html#faq-N100CC
> 
> 
> I'm still having problems. I've read this and it seems that it still
> doesnt work
> 
> a.xml:
> <?xml version="1.0" encoding="iso-8859-1"?>
> <Name>ç</Name>
> 
> a.xsl:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>         xmlns:xalan="http://xml.apache.org/xalan"
>         exclude-result-prefixes="xalan">
>         <xsl:output encoding="cp850" method="text"/>
>         <xsl:template match="/">
>                 <out>
>                         <xsl:copy-of select="xalan:checkEnvironment()"/>
>                 </out>
>                 <result>
>                     <xsl:value-of select="."/>
>                 </result>
>         </xsl:template>
> </xsl:stylesheet>
> 
> 
> Now the output (I tried multiple configurations - I think all of this are
> the same, but just to be sure):
> 
> java -jar lib/xalan.jar -XSL a.xsl -IN a.xml 
> 
> (Location of error unknown)XSLT Error
> (javax.xml.transform.TransformerException): org.xml.sax.SAXException:
> Attempt to output character of integral value 231 that is not represented
> in specified output encoding of cp850.
> 
> 
> java -Xbootclasspath/p:lib/xalan.jar;lib/xerces-Impl.jar;lib/xml-apis.jar;. org.apache.xalan.xslt.Process -XSL a.xsl -IN a.xml
> 
> (Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): org.xml.sax.SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp850.
> 
> 
> java -Djava.endorsed.dirs=lib -jar lib/xalan.jar -XSL a.xsl -IN a.xml
> 
> (Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): org.xml.sax.SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp850.
> 
> 
> java -Djava.endorsed.dirs=lib -cp . org.apache.xalan.xslt.Process  -XSL a.xsl -IN a.xml
> 
> (Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): org.xml.sax.SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp850
> 
> 
> If instead of text I use xml output, I get the following, so I'm sure I'm
> using the correct version.
> 
> 
> java -jar lib/xalan.jar -XSL a.xsl -IN a.xml ml  -IN a.xml
> 
> <?xml version="1.0" encoding="cp850"?>
> <out>
> <checkEnvironmentExtension>
> <EnvironmentCheck version="$Revision: 1.26 $">
> <environment>
> <item key="version.DOM.draftlevel">2.0fd</item>
> <item key="java.class.path">lib/xalan.jar</item>
> <item key="version.JAXP">1.1 or higher</item>
> <item key="java.ext.dirs">C:\Programas\Java\jre1.5.0_04\lib\ext</item>
> <foundJar desc="path" name="xalan.jar">C:\Programas\Java\jre1.5.0_04\lib\endorsed\xalan.jar</foundJar>
> <foundJar desc="apparent.version" name="xercesImpl.jar">xercesImpl.jar from Xerces-J-bin.2.6.2</foundJar>
> <foundJar desc="path" name="xercesImpl.jar">C:\Programas\Java\jre1.5.0_04\lib\endorsed\xercesImpl.jar</foundJar>
> <foundJar desc="apis.jar-apparent.version" name="xml">xml-apis.jar from tck-jaxp-1_2_0 branch of xml-commons, tag: xml-commons-external_1_2_01</foundJar>
> <foundJar desc="apis.jar-path" name="xml">C:\Programas\Java\jre1.5.0_04\lib\endorsed\xml-apis.jar</foundJar>
> <item key="version.xerces2">Xerces-J 2.6.2</item>
> <item key="version.xerces1">not-present</item>
> <item key="version.xalan2_2">Xalan Java 2.6.0</item>
> <item key="version.xalan1">not-present</item>
> <item key="version.ant">not-present</item>
> <item key="java.version">1.5.0_04</item>
> <item key="version.DOM">2.0</item>
> <item key="version.crimson">not-present</item>
> <item key="sun.boot.class.path">C:\Programas\Java\jre1.5.0_04\lib\endorsed\xalan.jar;C:\Programas\Java\jre1.5.0_04\lib\endorsed\xercesImpl.jar;C:\Programas\Java\jre1.5.0_04\lib\endorsed\xml-apis.jar;C:\Programas\Java\jre1.5.0_04\lib\rt.jar;C:\Programas\Java\jre1.5.0_04\lib\i18n.jar;C:\Programas\Java\jre1.5.0_04\lib\sunrsasign.jar;C:\Programas\Java\jre1.5.0_04\lib\jsse.jar;C:\Programas\Java\jre1.5.0_04\lib\jce.jar;C:\Programas\Java\jre1.5.0_04\lib\charsets.jar;C:\Programas\Java\jre1.5.0_04\classes</item>
> <foundJar desc="path" name="xalan.jar">c:\Documents and Settings\pedro_alves\2\lib\xalan.jar</foundJar>
> <item key="version.SAX">2.0</item>
> <item key="version.xalan2x">Xalan Java 2.6.0</item>
> </environment>
> <status result="OK"/>
> </EnvironmentCheck>
> </checkEnvironmentExtension>
> </out>
> <result>&#231;</result>
> 
> 
> 
> What am I doing wrong?
> 
> 
> 
> Thanks a lot
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xalan-dev-help@xml.apache.org

-- 
Pedro Alves

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Fri, Jul 29, 2005 at 08:38:28AM -0700, david_n_bertoni@us.ibm.com wrote:
> 
> http://xml.apache.org/xalan-j/faq.html#faq-N1005D
> http://xml.apache.org/xalan-j/faq.html#faq-N100CC


I'm still having problems. I've read this and it seems that it still
doesnt work

a.xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<Name>ç</Name>

a.xsl:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
        xmlns:xalan="http://xml.apache.org/xalan"
        exclude-result-prefixes="xalan">
        <xsl:output encoding="cp850" method="text"/>
        <xsl:template match="/">
                <out>
                        <xsl:copy-of select="xalan:checkEnvironment()"/>
                </out>
                <result>
                    <xsl:value-of select="."/>
                </result>
        </xsl:template>
</xsl:stylesheet>


Now the output (I tried multiple configurations - I think all of this are
the same, but just to be sure):

java -jar lib/xalan.jar -XSL a.xsl -IN a.xml 

(Location of error unknown)XSLT Error
(javax.xml.transform.TransformerException): org.xml.sax.SAXException:
Attempt to output character of integral value 231 that is not represented
in specified output encoding of cp850.


java -Xbootclasspath/p:lib/xalan.jar;lib/xerces-Impl.jar;lib/xml-apis.jar;. org.apache.xalan.xslt.Process -XSL a.xsl -IN a.xml

(Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): org.xml.sax.SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp850.


java -Djava.endorsed.dirs=lib -jar lib/xalan.jar -XSL a.xsl -IN a.xml

(Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): org.xml.sax.SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp850.


java -Djava.endorsed.dirs=lib -cp . org.apache.xalan.xslt.Process  -XSL a.xsl -IN a.xml

(Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): org.xml.sax.SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp850


If instead of text I use xml output, I get the following, so I'm sure I'm
using the correct version.


java -jar lib/xalan.jar -XSL a.xsl -IN a.xml ml  -IN a.xml

<?xml version="1.0" encoding="cp850"?>
<out>
<checkEnvironmentExtension>
<EnvironmentCheck version="$Revision: 1.26 $">
<environment>
<item key="version.DOM.draftlevel">2.0fd</item>
<item key="java.class.path">lib/xalan.jar</item>
<item key="version.JAXP">1.1 or higher</item>
<item key="java.ext.dirs">C:\Programas\Java\jre1.5.0_04\lib\ext</item>
<foundJar desc="path" name="xalan.jar">C:\Programas\Java\jre1.5.0_04\lib\endorsed\xalan.jar</foundJar>
<foundJar desc="apparent.version" name="xercesImpl.jar">xercesImpl.jar from Xerces-J-bin.2.6.2</foundJar>
<foundJar desc="path" name="xercesImpl.jar">C:\Programas\Java\jre1.5.0_04\lib\endorsed\xercesImpl.jar</foundJar>
<foundJar desc="apis.jar-apparent.version" name="xml">xml-apis.jar from tck-jaxp-1_2_0 branch of xml-commons, tag: xml-commons-external_1_2_01</foundJar>
<foundJar desc="apis.jar-path" name="xml">C:\Programas\Java\jre1.5.0_04\lib\endorsed\xml-apis.jar</foundJar>
<item key="version.xerces2">Xerces-J 2.6.2</item>
<item key="version.xerces1">not-present</item>
<item key="version.xalan2_2">Xalan Java 2.6.0</item>
<item key="version.xalan1">not-present</item>
<item key="version.ant">not-present</item>
<item key="java.version">1.5.0_04</item>
<item key="version.DOM">2.0</item>
<item key="version.crimson">not-present</item>
<item key="sun.boot.class.path">C:\Programas\Java\jre1.5.0_04\lib\endorsed\xalan.jar;C:\Programas\Java\jre1.5.0_04\lib\endorsed\xercesImpl.jar;C:\Programas\Java\jre1.5.0_04\lib\endorsed\xml-apis.jar;C:\Programas\Java\jre1.5.0_04\lib\rt.jar;C:\Programas\Java\jre1.5.0_04\lib\i18n.jar;C:\Programas\Java\jre1.5.0_04\lib\sunrsasign.jar;C:\Programas\Java\jre1.5.0_04\lib\jsse.jar;C:\Programas\Java\jre1.5.0_04\lib\jce.jar;C:\Programas\Java\jre1.5.0_04\lib\charsets.jar;C:\Programas\Java\jre1.5.0_04\classes</item>
<foundJar desc="path" name="xalan.jar">c:\Documents and Settings\pedro_alves\2\lib\xalan.jar</foundJar>
<item key="version.SAX">2.0</item>
<item key="version.xalan2x">Xalan Java 2.6.0</item>
</environment>
<status result="OK"/>
</EnvironmentCheck>
</checkEnvironmentExtension>
</out>
<result>&#231;</result>



What am I doing wrong?



Thanks a lot

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by George Cristian Bina <ge...@sync.ro>.
Hi,

Yes, you can do that, we use on oXygen for several years now a class 
loader that makes sure our jars are loaded first. I posted the code on 
the xerces list more than two years ago. Searching the archives... here 
it is:

http://marc.theaimsgroup.com/?l=xerces-j-user&m=103277394713890&q=raw

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Pedro Alves wrote:
> On Fri, Jul 29, 2005 at 05:26:38PM +0100, Pedro Alves wrote:
> 
>>On Fri, Jul 29, 2005 at 08:38:28AM -0700, david_n_bertoni@us.ibm.com wrote:
>>
>>>Often, users think they are using a particular version of Xalan-J, but 
>>>they end up using the older version that's built into theJava SDK:
>>
>>
>>And this was the case :(
> 
> 
> 
> Just one more thing. I'm using an app that is globally updated, and I
> don't want to depend on each client configuration.
> 
> Without changing the startup script to add -Djava.endorsed.dirs=... do I
> have any way to do this endorsement programmatically?
> 
> Guess not, but no hard done by asking...
> 
> 

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Fri, Jul 29, 2005 at 05:26:38PM +0100, Pedro Alves wrote:
> On Fri, Jul 29, 2005 at 08:38:28AM -0700, david_n_bertoni@us.ibm.com wrote:
> > Often, users think they are using a particular version of Xalan-J, but 
> > they end up using the older version that's built into theJava SDK:
> 
> 
> And this was the case :(


Just one more thing. I'm using an app that is globally updated, and I
don't want to depend on each client configuration.

Without changing the startup script to add -Djava.endorsed.dirs=... do I
have any way to do this endorsement programmatically?

Guess not, but no hard done by asking...


-- 
Pedro Alves
pedro.alves@zmail.pt

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Fri, Jul 29, 2005 at 08:38:28AM -0700, david_n_bertoni@us.ibm.com wrote:
> Often, users think they are using a particular version of Xalan-J, but 
> they end up using the older version that's built into theJava SDK:


And this was the case :(


Thanks for your help

-- 
Pedro Alves
pedro.alves@zmail.pt

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by da...@us.ibm.com.
> > However, if I use method="text", I get:
> >
> > (Location of error unknown)XSLT Error
> > (javax.xml.transform.TransformerException): org.xml.sax.SAXException:
> > Attempt to output character of integral value 231 that is not
> > represented in specified output encoding of cp850.
> 
> With method="text", encoding of the output is enforced, but fails for 
> some reason.
> 
> David, note that this bug is different from XALANJ-1799, since the name 
> of the desired encoding is printed out, which wasn't the case in 1799.

If you follow the duplicate bug reference, you get here:

http://issues.apache.org/bugzilla/show_bug.cgi?id=24278

which does indeed seem very much like the bug the user is seeing.  Note 
the bugzilla bug has the equivalent analog in Jira:

http://issues.apache.org/jira/secure/ViewIssue.jspa?key=XALANJ-1710

Often, users think they are using a particular version of Xalan-J, but 
they end up using the older version that's built into theJava SDK:

http://xml.apache.org/xalan-j/faq.html#faq-N1005D
http://xml.apache.org/xalan-j/faq.html#faq-N100CC

Dave

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Axel Weiß <aw...@informatik.hu-berlin.de>.
Pedro Alves wrote:
> On Thu, Jul 28, 2005 at 04:54:56PM -0700, david_n_bertoni@us.ibm.com 
wrote:
> > It's always good to search the Jira database before you post a
> > question:
>
> I found references to that, but I thought it was not the same case
>
> > http://issues.apache.org/jira/browse/XALANJ-1799
>
> The solution to that is to upgrade to xalan 2.6.0. That is the
> version I use.
>
> When I was making a test case I found out this:
>
> a.xml:
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <Articles>
>     <Article>
>         <Identification>
>             <Name>Testação de cents</Name>
>         </Identification>
>     </Article>
> </Articles>
>
>
> a.xsl:
> <xsl:stylesheet version="1.0"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>     <xsl:output encoding="cp850" method="xml"/>
>     <xsl:template match="//Identification">
>         <test><xsl:value-of select="."/></test>
>     </xsl:template>
> </xsl:stylesheet>
>
>
> Applying xalan, I get:
>
> <?xml version="1.0" encoding="cp850"?>
>
>                 <test>
>                         Testa&#231;&#227;o de cents
>                 </test>

Hi Pedro,

Outputting with method="xml", no encoding is done at all! That's why it 
succeeds.

> However, if I use method="text", I get:
>
> (Location of error unknown)XSLT Error
> (javax.xml.transform.TransformerException): org.xml.sax.SAXException:
> Attempt to output character of integral value 231 that is not
> represented in specified output encoding of cp850.

With method="text", encoding of the output is enforced, but fails for 
some reason.

David, note that this bug is different from XALANJ-1799, since the name 
of the desired encoding is printed out, which wasn't the case in 1799.

Cheers,
			Axel

-- 
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050
** www.freesp.de **

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Thu, Jul 28, 2005 at 04:54:56PM -0700, david_n_bertoni@us.ibm.com wrote:
> It's always good to search the Jira database before you post a question:

I found references to that, but I thought it was not the same case


> 
> http://issues.apache.org/jira/browse/XALANJ-1799

The solution to that is to upgrade to xalan 2.6.0. That is the version I
use.

When I was making a test case I found out this:

a.xml:

<?xml version="1.0" encoding="iso-8859-1"?>
<Articles>
    <Article>
        <Identification>
            <Name>Testação de cents</Name>
        </Identification>
    </Article>
</Articles>


a.xsl:
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output encoding="cp850" method="xml"/>
    <xsl:template match="//Identification">
        <test><xsl:value-of select="."/></test>
    </xsl:template>
</xsl:stylesheet>


Applying xalan, I get:

<?xml version="1.0" encoding="cp850"?>

                <test>
                        Testa&#231;&#227;o de cents
                </test>

However, if I use method="text", I get:

(Location of error unknown)XSLT Error
(javax.xml.transform.TransformerException): org.xml.sax.SAXException:
Attempt to output character of integral value 231 that is not represented
in specified output encoding of cp850.



Thanks




-- 
Pedro Alves
pedro.alves@zmail.pt

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by da...@us.ibm.com.
> > Hi Pedro,
> > 
> > did you already try using ICU transcoder? The usually used ICONV 
> > transcoder is somewhat weak...
> 
> 
> No, and as a matter of fact have never heard of it. 
> 
> I just think its strange because if I write a OutputWriter with that
> encoding it works ok 

It's always good to search the Jira database before you post a question:

http://issues.apache.org/jira/browse/XALANJ-1799

Note this is a Xalan-J issue, so the ICU transcoders are not relevant.

Dave

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Pedro Alves <pe...@neraka.no-ip.org>.
On Thu, Jul 28, 2005 at 10:49:52PM +0200, Axel Weiß wrote:
> Pedro Alves wrote:
> > Hello. I'm having this error when transforming a xml doc with a xslt:
> >
> > SAXException: Attempt to output character of integral value 231 that
> > is not represented in specified output encoding of cp860
> >
> >
> > I have <xsl:output encoding="cp860" method="text"/>
> >
> >
> > cp860 is the code page for Portuguese language, and 231 is 'ç', one of
> > the most widely use characters here. (I get this error whatever the
> > special character I use).
> >
> >
> > Is this a feature? Outputting in 8859-1 or utf works fine, but I need
> > that encoding to send the info to a 3rd party app that only works that
> > way.
> 
> Hi Pedro,
> 
> did you already try using ICU transcoder? The usually used ICONV 
> transcoder is somewhat weak...


No, and as a matter of fact have never heard of it. 

I just think its strange because if I write a OutputWriter with that
encoding it works ok 



-- 
Pedro Alves
pedro.alves@zmail.pt

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


Re: SAXException: Attempt to output character of integral value 231 that is not represented in specified output encoding of cp860

Posted by Axel Weiß <aw...@informatik.hu-berlin.de>.
Pedro Alves wrote:
> Hello. I'm having this error when transforming a xml doc with a xslt:
>
> SAXException: Attempt to output character of integral value 231 that
> is not represented in specified output encoding of cp860
>
>
> I have <xsl:output encoding="cp860" method="text"/>
>
>
> cp860 is the code page for Portuguese language, and 231 is 'ç', one of
> the most widely use characters here. (I get this error whatever the
> special character I use).
>
>
> Is this a feature? Outputting in 8859-1 or utf works fine, but I need
> that encoding to send the info to a 3rd party app that only works that
> way.

Hi Pedro,

did you already try using ICU transcoder? The usually used ICONV 
transcoder is somewhat weak...

Cheers,
			Axel

-- 
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050
** www.freesp.de **

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