copyright symbol in web.config

G

Guest

How can I add a copyright symbol to a web.config file? I cannot use the © or
char(169) statements, I need to pass the string onto another application.

The following works on Window XP Professional, IIS 5.1, but fails on Windows
Server 2003, IIS 6.0:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="CopyrightGDT"
value="© 2006 Tele Atlas, Rel. 07/2005."></add>
…

I suspect the utf-8 encoding is causing the problem, but have not been able
to change to utf-16 or us-ascii with any success.

Thanks, Richard
 
G

Guest

Nope. I should have included © in my list with © and char(169). (c) doesn't
work for my marketing folk either.

Any "extended" character would probably suffer the same problem; not just
the copyright symbol.

Richard
 
S

Stephen Ahn

How about

value="© 2006 Tele Atlas, Rel. 07/2005."

OR

value="© 2006 Tele Atlas, Rel. 07/2005."

HTH,
Stephen
 
J

Joerg Jooss

Thus wrote moWhite,
How can I add a copyright symbol to a web.config file? I cannot use
the © or char(169) statements, I need to pass the string onto another
application.

The following works on Window XP Professional, IIS 5.1, but fails on
Windows Server 2003, IIS 6.0:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="CopyrightGDT"
value="© 2006 Tele Atlas, Rel. 07/2005."></add>

I suspect the utf-8 encoding is causing the problem, but have not been
able to change to utf-16 or us-ascii with any success.

© is a Unicode character, so UTF-8 cannot be the problem. Do you really save
the web.config as UTF-8?

Cheers,
 
G

Guest

Thanks for the response. I tried © © and get the same web config error. I'm
assuming that à©© would give the same result.

Has anyone been able to get any special character in a web.config with
encoding set to utf-8?

Richard
 
G

Guest

I'm not sure what you mean by "save the web.config as UTF-8". I'm setting
the encoding attribute to utf-8 in the xml declaration, but I use either
notepad or VS 2003 IDE to edit and save the actual file. I would assume that
its a dos or windows text file. The copyright symbol © shows up fine in the
actual file.

Richard
 
J

Joerg Jooss

Thus wrote moWhite,
I'm not sure what you mean by "save the web.config as UTF-8". I'm
setting the encoding attribute to utf-8 in the xml declaration, but I
use either notepad or VS 2003 IDE to edit and save the actual file. I
would assume that its a dos or windows text file. The copyright
symbol © shows up fine in the actual file.

Simply setting an XML declaration with encoding attribute doesn't mean the
file actual uses that encoding. In Notepad, you can select the encoding in
the Save As dialog. In VS2005, you can select the encoding under File->Advanced
Save Options.

Cheers,
 
G

Guest

You are exactly correct. I use a file compare program to compare my web
config files on various servers and keep them in sync. It changes the
encoding to ANSI. I've made the correction and am no longer failing on the
copyright symbol. This has been a problem for months with zero solution.

Thanks, Richard
 
Joined
Aug 22, 2012
Messages
1
Reaction score
0
Solved my woes by changing the encoding to <?xml version="1.0" encoding="iso-8859-1"?> to get the character to display correctly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top