This project is read-only.
1

Resolved

Failed on localised classes/methods names

description

Sandcastle not support localised classes/methods/identifiers names in C# code.
 
For example:
public class МойКласс
{
public void МойМетод()
{
// ....
}
}
 
It success compiled by Visual Sudio (2003-2008), but Sandcastle is failed on XslTransform step.
 
Result of execution XslTransform:
 
"C:\Tools\Sandcastle\ProductionTools\XslTransform" /xsl:"C:\Tools\Sandcastle\ProductionTransforms\ReflectionToChmIndex.xsl" reflection.xml /out:"MyHelp.hhk"
 
Unhandled Exception: System.Text.EncoderFallbackException: Unable to translate Unicode character \u0441 at index 735 to specified code page.
at System.Text.EncoderExceptionFallbackBuffer.Fallback(Char charUnknown, Int32 index)
at System.Xml.CharEntityEncoderFallbackBuffer.Fallback(Char charUnknown, Int32 index)
at System.Text.EncoderFallbackBuffer.InternalFallback(Char ch, Char& chars)
at System.Text.Latin1Encoding.GetBytes(Char
chars, Int32 charCount, Byte* bytes, Int32 byteCount, EncoderNLS encoder)
at System.Text.EncoderNLS.Convert(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount, Boolean flush, Int32& charsUsed, Int32& bytesUsed, Boolean& completed)
at System.Text.EncoderNLS.Convert(Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, Int32 byteCount, Boolean flush, Int32& charsUsed, Int32& bytesUsed, Boolean& completed)
at System.Xml.XmlEncodedRawTextWriter.EncodeChars(Int32 startOffset, Int32 endOffset, Boolean writeAllToStream)
at System.Xml.XmlEncodedRawTextWriter.FlushBuffer()
at System.Xml.XmlEncodedRawTextWriter.WriteRawWithCharChecking(Char* pSrcBegin, Char* pSrcEnd)
at System.Xml.XmlEncodedRawTextWriter.WriteRaw(String data)
at System.Xml.TextEncodedRawTextWriter.WriteString(String textBlock)
at System.Xml.Xsl.Runtime.XmlQueryOutput.WriteString(String text, Boolean disableOutputEscaping)
at System.Xml.Xsl.Runtime.XmlQueryOutput.WriteString(String text)
at <xsl:template name="createIndexEntry">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList1 text, IList1 file)
at <xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(XmlReader contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
at System.Xml.Xsl.XslCompiledTransform.Transform(XmlReader input, XsltArgumentList arguments, XmlWriter results)
at Microsoft.Ddue.Tools.XslTransformer.Main(String[] args)
Last step completed in 00:00:19.2783
 
 
BUILD FAILED: Unexpected error in last build step. See output above for details.

file attachments

comments

alexbirk wrote Jan 16, 2008 at 1:56 PM

I test it on last Sandcastle January 2008 Relase - issue exist.

alexbirk wrote Jan 16, 2008 at 3:10 PM

Example archive in attach.
Steps to reproduce:
1) Copy test.dll and comments.xml to [Sandcastle]\Examples\sandcastle folder.
2) Run C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msbuild.exe build.proj /property:PresentationStyle=prototype

In result - crashed XslTransformer. See Build.log in archive.

wrote Jan 16, 2008 at 3:10 PM

aram wrote Jan 17, 2008 at 4:00 PM

Thanks Alex. This is a bug and I will get this fixed for our February 2008 release.

wrote Jan 17, 2008 at 4:01 PM

aram wrote Jan 17, 2008 at 4:06 PM

Assigned for February 2008 release.

wrote Jan 17, 2008 at 4:06 PM

StevenPei wrote Feb 4, 2008 at 8:54 AM

This is a bug of build.proj, actually we don't need to use ReflectionToChmIndex.xsl anymore. It's out of date and we will not update it. You can safely remove the following line in build.proj. Thanks.
    <Exec Condition="'$(PresentationStyle)' == 'prototype'" Command='"$(ProductionTools)\XslTransform.exe" /xsl:"$(ProductionTransforms)\ReflectionToChmIndex.xsl" reflection.xml /out:"$(chmDir)\test.hhk"' />

EWoodruff wrote Feb 4, 2008 at 6:09 PM

The current version of SHFB does use it which appears to be what he is using. I've gotten rid of it in the next release so it won't be an issue anymore.

Eric

EWoodruff wrote Mar 6, 2008 at 3:25 AM

If using SHFB, 1.6.0.5 Beta is now available which should fix the issue as it no longer uses the noted transformation file.

DarrenParker wrote Jan 18, 2011 at 11:11 PM

not a bug in sandcastle code

wrote Feb 22, 2013 at 1:40 AM

wrote May 16, 2013 at 12:53 PM

wrote May 16, 2013 at 12:53 PM

wrote Jun 14, 2013 at 8:33 AM