Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WebApplication.NewWindow ignores encoding
#1
Hello,

I have a XML files created with ISO-8859-1. I want to to use  the Swedish special characters.
<?xml version="1.0" encoding="ISO-8859-1"?>.......

If I double click on the file, the file is opened with a browser and all is fine.
If I show the file in a TIWText all is fine.

But when sending it with WebApplication.NewWindow()   it does not work. The browser complains on the first Swedish special character.


Is this a bug?

Regards
  Mikael
Reply
#2
IntraWeb uses UTF-8. Almost no one uses those older encodings as they have lots of issues. Set it to UTF-8.
Reply
#3
(04-23-2020, 02:44 PM)kudzu Wrote: IntraWeb uses UTF-8. Almost no one uses those older encodings as they have lots of issues. Set it to UTF-8.


Well that explains it and Yes I can change this particular file to UTF-8  because it is file I have created.

But this is not true "Almost no one uses those older encodings"...
Our company act as a EDI Interchange company. We are transporting 100 000 files from sender  to receiver every week.
And 50% of the files are still in ISO-8859-1 format.

When dealing with XML files, you can use the encoding option to inform the browser what format the xml file is in.
What is the problem? Why can't Intraweb respect that option?

I hope this option can be added to intraweb in a near future.

/Mikael
Reply
#4
This is not a bug. If you are serving XML and expect it to have a specific encoding you can do it using a content handler.

This example shows you how: https://github.com/Atozed/IntraWeb/tree/...ntHandlers

You can basically provide anything in any format. However, IntraWeb it will always use the default UTF-8 for HTML content.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)