"forest demon" <
[email protected]> wrote in message
i've been trying to create a code snippet that would contain a special
character...i.e. a trademark symbol (™).
but to no avail. whether in the CDATA section or a literal
definition, no workie!
anyone know if there's a way around this?
Can you show us some code that is failing, if you just have that in a
string
there is no reason it should fail.
thanks for the reply anthony...
down in the CDATA section, you'll see BLAH™
i can't get it to work. and if i remove the TradeMark symbol, it works
fine.
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="
http://schemas.microsoft.com/VisualStudio/2005/
CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>
Class Header
</Title>
<Description>
Inserts class header requirements specific to Company, Inc
development
</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>trademark</ID>
<Default></Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[#region Copyright
/// Copyright Company, Inc.
///
/// This program is protected under Patent Pending Filings with the
State of Illinois,
/// and is not an open-source code base. No utilization of said
codebase nor program
/// may be utilized unless express consent has been placed by
Company, Inc.
/// BLAH™ is a trademark owned by Company, Inc. Any attempts to harm
the efforts
/// represented by this and all other vested interests of this
company, whether direct
/// or indirect, will be aggressively prosecuted to the fullest
extent of the law.
/// All Rights Reserved.
#endregion
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
The xml declare indicates the file has a UTF-8 encoding, are you sure the
file is saved as UTF-8. Open it in notepad and select save as... I suspect
it says ANSI, change it to UTF-8 and save.