|
Architect or Cobbler?
Good code starts with good design |
|
about me
links
Blogs I follow
recent posts
archives
feeds |
XML and £ symbolsThursday, May 04, 2006The problem here is that if you edit and save something in Windows it typically saves it with an ANSI encoding. Now ANSI encoding doesn't actually mean anything, what this actually means is that the file is saved using an ANSI standard Windows code page. For Western Europe and the USA this is typically CP1252, which is essentially the same as ISO-8859-1, except for some control characters in the range 128-152. Unfortunately this includes the Euro symbol, so you can't just say encoding="ISO-8859-1" in the xml declaration, I believe you can say encoding="windows-1252", but haven't actually tried this. Usually what I do is simply open the file in Notepad and then save it as UTF-8 using the little dropdown. What about doing it via code though? Well usually I do something like this: Of course if your default Windows encoding isn't CP1252 this won't work :-) # posted by James @ 6:15 PM Developer DayTuesday, May 02, 2006Developer Day is a nice little developer conference run by the UK .NET user group community. I'm talking on Windows Workflow Foundation, which I've been tinkering with since last years PDC. I'll probably post the slides and sample code on here as I get it working. And for Martin, who avidly reads my writings, today I'm feeling mostly perky. # posted by James @ 3:29 PM |
|
|
|