.Net ramblings
# Thursday, 17 July 2008
Euro symbol character problems...
if you ever send a string across a web service, and write it out to a file, make sure you specify Encoding.UTF8 explicitly. otherwise characters such as the EURO symbol may not render correctly in some browsers (IE6).  it took me ages to pin this down, because everything i read about was about HTTP header charset values, or HTML document charsets, or database encodings.  In my case i was using the default encoding and this messed up EURO symbols. I suspect it is because of the string being serialized in the web service, but haven't the time to look into it any further.  it's fixed now anyhow.


Thursday, 17 July 2008 17:25:32 (GMT Daylight Time, UTC+01:00)  #    Comments [3]  .Net General | Asp.Net

Thursday, 17 July 2008 23:17:48 (GMT Daylight Time, UTC+01:00)
€ should always work regardless of encoding.

[)amien
Friday, 18 July 2008 09:08:36 (GMT Daylight Time, UTC+01:00)
hi damien. that's true, but my html editor (XStandard) replaces escaped characters like this with their literals.
Also literal characters have several advantages, quote from XStandard "It is not encouraged to use HTML entities, because they are an old fashioned way to escape characters. Entities unnecessarily complicate the maintenance of your markup and they make it more difficult for markup to be processed by XML technologies like DOM parsers and XSLT."
tim mackey
Friday, 18 July 2008 09:09:02 (GMT Daylight Time, UTC+01:00)
hi damien. that's true, but my html editor (XStandard) replaces escaped characters like this with their literals.
Also literal characters have several advantages, quote from XStandard "It is not encouraged to use HTML entities, because they are an old fashioned way to escape characters. Entities unnecessarily complicate the maintenance of your markup and they make it more difficult for markup to be processed by XML technologies like DOM parsers and XSLT."
tim mackey
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview