You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org> on 2005/07/19 15:33:47 UTC
[jira] Created: (XALANC-535) If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
------------------------------------------------------------------------------------------------------------------
Key: XALANC-535
URL: http://issues.apache.org/jira/browse/XALANC-535
Project: XalanC
Type: Bug
Components: XalanC
Versions: CurrentCVS
Environment: all
Reporter: Dmitry Hayes
Assigned to: Dmitry Hayes
Priority: Minor
Fix For: CurrentCVS
For an input:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output encoding='XML' version='1.0'/>
<xsl:template match="/">
<out>
<xsl:element name='Somename_
'/>
</out>
</xsl:template>
</xsl:stylesheet>
output:
<?xml version="1.0" encoding="UTF-8"?><out/>
In the XalanDOMString.cpp, "doTranscodeToLocalCodePage" function
...
if (wcstombs(&theTargetVector[0], theTempSource, targetLen) == ~size_t(0))
{
theTargetVector.clear();
return false;
}
...
"wcstombs" fails and we return the empty vector . Probably solution here may be, if transcoding to the local code page fails , try to transcode to UTF8 and return the vector
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANC-535) If an error/warning message contains
not-displayable character for the local encoding , no message is shown at
all
Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XALANC-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468700 ]
Dmitry Hayes commented on XALANC-535:
-------------------------------------
Dave , can you please look at the suggested patch . Thanks!
> If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
> ------------------------------------------------------------------------------------------------------------------
>
> Key: XALANC-535
> URL: https://issues.apache.org/jira/browse/XALANC-535
> Project: XalanC
> Issue Type: Bug
> Components: XalanC
> Affects Versions: CurrentCVS
> Environment: all
> Reporter: Dmitry Hayes
> Assigned To: Dmitry Hayes
> Priority: Minor
> Fix For: CurrentCVS
>
> Attachments: patch.txt, patch2.txt
>
>
> For an input:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output encoding='XML' version='1.0'/>
> <xsl:template match="/">
> <out>
> <xsl:element name='Somename_
'/>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> output:
> <?xml version="1.0" encoding="UTF-8"?><out/>
> In the XalanDOMString.cpp, "doTranscodeToLocalCodePage" function
> ...
> if (wcstombs(&theTargetVector[0], theTempSource, targetLen) == ~size_t(0))
> {
> theTargetVector.clear();
> return false;
> }
> ...
> "wcstombs" fails and we return the empty vector . Probably solution here may be, if transcoding to the local code page fails , try to transcode to UTF8 and return the vector
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Updated: (XALANC-535) If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANC-535?page=all ]
Dmitry Hayes updated XALANC-535:
--------------------------------
Attachment: patch2.txt
> If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
> ------------------------------------------------------------------------------------------------------------------
>
> Key: XALANC-535
> URL: http://issues.apache.org/jira/browse/XALANC-535
> Project: XalanC
> Type: Bug
> Components: XalanC
> Versions: CurrentCVS
> Environment: all
> Reporter: Dmitry Hayes
> Assignee: Dmitry Hayes
> Priority: Minor
> Fix For: CurrentCVS
> Attachments: patch.txt, patch2.txt
>
> For an input:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output encoding='XML' version='1.0'/>
> <xsl:template match="/">
> <out>
> <xsl:element name='Somename_
'/>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> output:
> <?xml version="1.0" encoding="UTF-8"?><out/>
> In the XalanDOMString.cpp, "doTranscodeToLocalCodePage" function
> ...
> if (wcstombs(&theTargetVector[0], theTempSource, targetLen) == ~size_t(0))
> {
> theTargetVector.clear();
> return false;
> }
> ...
> "wcstombs" fails and we return the empty vector . Probably solution here may be, if transcoding to the local code page fails , try to transcode to UTF8 and return the vector
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANC-535) If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANC-535?page=comments#action_12316107 ]
David Bertoni commented on XALANC-535:
--------------------------------------
If we're going to transcode to something based on ASCII, we should just transcode to pure ASCII, and use a substitution character for something that's not representable.
> If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
> ------------------------------------------------------------------------------------------------------------------
>
> Key: XALANC-535
> URL: http://issues.apache.org/jira/browse/XALANC-535
> Project: XalanC
> Type: Bug
> Components: XalanC
> Versions: CurrentCVS
> Environment: all
> Reporter: Dmitry Hayes
> Assignee: Dmitry Hayes
> Priority: Minor
> Fix For: CurrentCVS
>
> For an input:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output encoding='XML' version='1.0'/>
> <xsl:template match="/">
> <out>
> <xsl:element name='Somename_
'/>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> output:
> <?xml version="1.0" encoding="UTF-8"?><out/>
> In the XalanDOMString.cpp, "doTranscodeToLocalCodePage" function
> ...
> if (wcstombs(&theTargetVector[0], theTempSource, targetLen) == ~size_t(0))
> {
> theTargetVector.clear();
> return false;
> }
> ...
> "wcstombs" fails and we return the empty vector . Probably solution here may be, if transcoding to the local code page fails , try to transcode to UTF8 and return the vector
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANC-535) If an error/warning message contains
not-displayable character for the local encoding , no message is shown at
all
Posted by "David Bertoni (JIRA)" <xa...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XALANC-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470349 ]
David Bertoni commented on XALANC-535:
--------------------------------------
I'm not sure changing TranscodeToLocalCodePage() so that it transcodes to UTF-8 if the local code page can't represent a character is the right thing to do. For example, if we're running on an EBCDIC system, then UTF-8 is not going to work at all.
Instead, we should make sure that callers check the return value, then attempt to do something else if code page conversion fails. As a fallback, TranscodeToLocalCodePage() should use a substitution character for any characters that are not representable.
> If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
> ------------------------------------------------------------------------------------------------------------------
>
> Key: XALANC-535
> URL: https://issues.apache.org/jira/browse/XALANC-535
> Project: XalanC
> Issue Type: Bug
> Components: XalanC
> Affects Versions: CurrentCVS
> Environment: all
> Reporter: Dmitry Hayes
> Assigned To: Dmitry Hayes
> Priority: Minor
> Fix For: CurrentCVS
>
> Attachments: patch.txt, patch2.txt
>
>
> For an input:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output encoding='XML' version='1.0'/>
> <xsl:template match="/">
> <out>
> <xsl:element name='Somename_
'/>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> output:
> <?xml version="1.0" encoding="UTF-8"?><out/>
> In the XalanDOMString.cpp, "doTranscodeToLocalCodePage" function
> ...
> if (wcstombs(&theTargetVector[0], theTempSource, targetLen) == ~size_t(0))
> {
> theTargetVector.clear();
> return false;
> }
> ...
> "wcstombs" fails and we return the empty vector . Probably solution here may be, if transcoding to the local code page fails , try to transcode to UTF8 and return the vector
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Updated: (XALANC-535) If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
Posted by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANC-535?page=all ]
Dmitry Hayes updated XALANC-535:
--------------------------------
Attachment: patch.txt
Patch for the problem . Commiters please review ! Thanks!
> If an error/warning message contains not-displayable character for the local encoding , no message is shown at all
> ------------------------------------------------------------------------------------------------------------------
>
> Key: XALANC-535
> URL: http://issues.apache.org/jira/browse/XALANC-535
> Project: XalanC
> Type: Bug
> Components: XalanC
> Versions: CurrentCVS
> Environment: all
> Reporter: Dmitry Hayes
> Assignee: Dmitry Hayes
> Priority: Minor
> Fix For: CurrentCVS
> Attachments: patch.txt
>
> For an input:
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output encoding='XML' version='1.0'/>
> <xsl:template match="/">
> <out>
> <xsl:element name='Somename_
'/>
> </out>
> </xsl:template>
> </xsl:stylesheet>
> output:
> <?xml version="1.0" encoding="UTF-8"?><out/>
> In the XalanDOMString.cpp, "doTranscodeToLocalCodePage" function
> ...
> if (wcstombs(&theTargetVector[0], theTempSource, targetLen) == ~size_t(0))
> {
> theTargetVector.clear();
> return false;
> }
> ...
> "wcstombs" fails and we return the empty vector . Probably solution here may be, if transcoding to the local code page fails , try to transcode to UTF8 and return the vector
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org