G
Guest
I have a strange exception occuring in the CLR 1.1 framework.
I have an EUC-JP file.
If I convert it to SJIS using nkf, load it into SQL Server (using a text
data source), then use the CLR to output it to an EUC-JP web page, I have no
problem.
But if I convert the same EUC-JP web page to UTF-16 using iconv, load it
into SQL Server (using a text data source set to Unicode), then use the CLR
to output it to an EUC-JP web page, depending on the text, I occasionally get
a NotSupportedException. This is very strange to me, as (1) the text came
from EUC-JP originally and (2) the Kanji all looks OK.
Has anyone seen anything remotely like this? The stack trace is deep in
CLR, so it's impossible to tell where it's barfing, but here it is:
[NotSupportedException: The specified encoding could not complete the
requested conversion on this platform.]
System.Text.MLangCodePageEncoding.nativeUnicodeToBytes(Int32 codePage,
Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32
byteIndex, Int32 byteCount) +0
System.Text.MLangEncoder.GetBytes(Char[] chars, Int32 charIndex, Int32
charCount, Byte[] bytes, Int32 byteIndex, Boolean flush) +118
System.Web.HttpWriter.FlushCharBuffer(Boolean flushEncoder) +213
System.Web.HttpWriter.Write(Char ch) +22
System.Web.UI.HtmlTextWriter.Write(Char value) +32
System.Xml.Xsl.TextOutput.Write(Char outputChar) +13
System.Xml.Xsl.SequentialOutput.WriteHtmlUri(String value) +487
System.Xml.Xsl.SequentialOutput.WriteAttributes(ArrayList list, Int32
count, HtmlElementProps htmlElementsProps) +291
System.Xml.Xsl.SequentialOutput.WriteStartElement(RecordBuilder record)
+301
System.Xml.Xsl.SequentialOutput.OutputRecord(RecordBuilder record) +54
System.Xml.Xsl.SequentialOutput.RecordDone(RecordBuilder record) +76
System.Xml.Xsl.RecordBuilder.CanOutput(Int32 state) +75
System.Xml.Xsl.RecordBuilder.EndEvent(Int32 state, XPathNodeType
nodeType) +14
System.Xml.Xsl.Processor.EndEvent(XPathNodeType nodeType) +88
System.Xml.Xsl.EndEvent.Output(Processor processor, ActionFrame frame) +13
System.Xml.Xsl.CopyCodeAction.Execute(Processor processor, ActionFrame
frame) +85
System.Xml.Xsl.ActionFrame.Execute(Processor processor) +24
System.Xml.Xsl.Processor.Execute() +78
System.Xml.Xsl.XslTransform.Transform(IXPathNavigable input,
XsltArgumentList args, TextWriter output) +75
GotDotNet.Exslt.ExsltTransform.Transform(IXPathNavigable ixn,
XsltArgumentList arglist, TextWriter writer) +122
Ranking.Ranking_Output_XSL_2.Render(HtmlTextWriter writer) in
c:\inetpub\wwwroot\Ranking\Ranking_Output_XSL_2.vb:222
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +130
System.Web.UI.Page.ProcessRequestMain() +1897
Regards,
Jonathan
I have an EUC-JP file.
If I convert it to SJIS using nkf, load it into SQL Server (using a text
data source), then use the CLR to output it to an EUC-JP web page, I have no
problem.
But if I convert the same EUC-JP web page to UTF-16 using iconv, load it
into SQL Server (using a text data source set to Unicode), then use the CLR
to output it to an EUC-JP web page, depending on the text, I occasionally get
a NotSupportedException. This is very strange to me, as (1) the text came
from EUC-JP originally and (2) the Kanji all looks OK.
Has anyone seen anything remotely like this? The stack trace is deep in
CLR, so it's impossible to tell where it's barfing, but here it is:
[NotSupportedException: The specified encoding could not complete the
requested conversion on this platform.]
System.Text.MLangCodePageEncoding.nativeUnicodeToBytes(Int32 codePage,
Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32
byteIndex, Int32 byteCount) +0
System.Text.MLangEncoder.GetBytes(Char[] chars, Int32 charIndex, Int32
charCount, Byte[] bytes, Int32 byteIndex, Boolean flush) +118
System.Web.HttpWriter.FlushCharBuffer(Boolean flushEncoder) +213
System.Web.HttpWriter.Write(Char ch) +22
System.Web.UI.HtmlTextWriter.Write(Char value) +32
System.Xml.Xsl.TextOutput.Write(Char outputChar) +13
System.Xml.Xsl.SequentialOutput.WriteHtmlUri(String value) +487
System.Xml.Xsl.SequentialOutput.WriteAttributes(ArrayList list, Int32
count, HtmlElementProps htmlElementsProps) +291
System.Xml.Xsl.SequentialOutput.WriteStartElement(RecordBuilder record)
+301
System.Xml.Xsl.SequentialOutput.OutputRecord(RecordBuilder record) +54
System.Xml.Xsl.SequentialOutput.RecordDone(RecordBuilder record) +76
System.Xml.Xsl.RecordBuilder.CanOutput(Int32 state) +75
System.Xml.Xsl.RecordBuilder.EndEvent(Int32 state, XPathNodeType
nodeType) +14
System.Xml.Xsl.Processor.EndEvent(XPathNodeType nodeType) +88
System.Xml.Xsl.EndEvent.Output(Processor processor, ActionFrame frame) +13
System.Xml.Xsl.CopyCodeAction.Execute(Processor processor, ActionFrame
frame) +85
System.Xml.Xsl.ActionFrame.Execute(Processor processor) +24
System.Xml.Xsl.Processor.Execute() +78
System.Xml.Xsl.XslTransform.Transform(IXPathNavigable input,
XsltArgumentList args, TextWriter output) +75
GotDotNet.Exslt.ExsltTransform.Transform(IXPathNavigable ixn,
XsltArgumentList arglist, TextWriter writer) +122
Ranking.Ranking_Output_XSL_2.Render(HtmlTextWriter writer) in
c:\inetpub\wwwroot\Ranking\Ranking_Output_XSL_2.vb:222
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +130
System.Web.UI.Page.ProcessRequestMain() +1897
Regards,
Jonathan