Scandinavian character corruption...

User 2574201 Photo


Registered User
14 posts

I'm a new S-drive user and have run into a problem that seems to have been aired quite frequently before but I havn't managed to find a discussion or thread where a solution is given.

In short:
I have a site where the results of an annual competition are published. The result forms are created by a Delphi XE2+QuickReport application and there were no problems on a previous site where I used Ipswitch WS FTP to upload them. Now on S-drive, however the scandinavian letters (äåö) come out corrupted.

There is a simple workaround: pull the form into the HTML editor, edit something, save the form, sync with S-drive and everything is ok! But: the annual report contains some 50+ forms and I'm not very keen on doing some meaningless editing back and forth on all of them every year!
In a thread (can't find that thread again!) I found the advise to put in a <meta charset="utf-8"> in the head of every form. That did not solve the situation but still had some impact: originally I got the corrupted characters when I pressed F12 for the split view, now they are displayed correctly. The uploaded forms still don't display correctly but at least the erraneous display is different from before. But if I first use F12, then save the file when closing and after that upload it the form is displayed correctly.

That is still a far too clumsy way to solve this problem. Any advise on how to get a permanent, non-manual solution to this will be much appreciated, In addition I would be grateful for an explanation on what is really going on with these characters here as I cannot make head or tail of it!
(Note: I have the source code for the program (QuickReport QRWebFilt.pas) creating the forms so solutions involving changes/additions at that level are quite acceptable in my case altough that's of course not a proper "CoffeeCup solution"!)
-Lup
User 298877 Photo


Ambassador
292 posts

Hi Lup,

Since you mentioned Ipswitch WS FTP I'll assume you are familiar with ftp clients.

Have you tried the following:

a) Use Coffeecup Direct FTP (free, trial or full version) as your client

b) In DFTP go to Actions->Transfer Mode and set it to binary.

Now, try uploading your forms and see if the problem persists.

Dave :)

PS: To use S-Drive with CC DFTP, you just set it up with your CC username & password. There is no other special settings / user details needed - neat!
User 2574201 Photo


Registered User
14 posts

Thanks Dave!

I downloaded DFTP.
Great tool but in this case it didn't help, the characters still remained corrupted.:(
-Lup
User 298877 Photo


Ambassador
292 posts

Hi Lup,

Can you post a link to your site so we can have a look?

Rather than <meta charset="utf-8"> in the header, try <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> and make sure it is placed in the line right after the opening <head> tag.

If that doesn't solve it, you may need to use codes to display Scandinavian letters. For example, &auml; will display ä and &aring; will display å.

Wherever these letters are in your text just replace them with the html code for the character. No other special coding is required. For example, where you have Ågård you would replace it with Åg&aring;rd.

Others may have other suggestions but using the html code for any of the myriad of symbols and special characters outside of the basic Abc....xyz alphabet will always render correctly in all browsers.

There is a comprehensive list of html codes and their respective symbols and characters available here: http://www.ascii.cl/htmlcodes.htm

Dave :)
User 2574201 Photo


Registered User
14 posts

Hi Dave,

I followed your suggestions. Adding "<meta..." didn't change anything but the use of html codes for the characters made the website display properly.
There was quite some work involved in getting the webfilter module of QuickReport to scan for characters needing to be modified as not only the text itself should be scanned but all link headers etc and not only for the common swedish/finnish characters (äåö) but in addition for other special characters that had a high risk of popping up in personal names (ü, e´,è, ñ etc).

Altough the problem is solved for me just now I think the whole approach is wrong: it should not be necessary to modify third-party software (QuickReport for Embarcadero Delphi in this case) in order to get the proper display from S-drive!
I made some testing in order to understand better where the problem lies but in the end I'm almost as confused as before!
I changed my modification of the webfilter module so that ä and Ä were excluded from the modification and then ran my report creation application again, intentionally producing non-corrected output.
As expected everything exept ä and Ä displayed properly on the web.
What, however, surprised me was that if I loaded one of the pages created into CC HTML editor and then display it with a browser (GC, IE or FF) the display was ok but if displaying the same page with the same browser from S-drive the ä:s and Ä:s were replaced by empty boxes (Opera and IE) or black diagonal boxes with a "?" (FF and GC)
Clearly something happens in the transfer from my disk to the s-drive!
(Note: Originally there was a different form of erraneous display but that has disappeared during the software modifications done during the last days!)

You can view my s-drive site at http://lupander.com/syndalen/. Select 2013 on the first page and any alternative on the second. (Note that the two first pages are outside this discussion, they are not created programaticlly!)
-Lup
User 298877 Photo


Ambassador
292 posts

Hi,

You should remove the line: "<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">" and also revise the line <meta charset="utf-8"> as per my suggestion.

For me, (in various browsers) the page at http://www.lupander.com/syndalen/2013/yindex.html displays all letters properly.

Have you tried clearing you cache since making the changes I suggested?

Re-visit the page in your test browsers and use CTRL-F5 to force the browser to refresh from the server.

Dave :)
User 2574201 Photo


Registered User
14 posts

Hi,

Sorry, the last paragraph in my reply was not very clear.:(
What I tried to say was that two first pages you meet when displaying my site, index.html and yindex.html are outside this discussion. They are old pages (created using Word) and altough clumsy in many ways now at least display properly.
The real problem area starts at http://www.lupander.com/syndalen/2013/g1x/GEN10be.html, that is the pages you reach by selecting 2013 on the initial page (index.html) and then 1. (or FSV or 2. or ....) on the second (yindex.html). Note that neither 2011 nor 2012 contains data reflecting current state of my software.

The use Ctrl-F5 changes nothing.

-Lup
User 187934 Photo


Senior Advisor
20,241 posts
Online Now

I would try restructuring the page as it won't validate.
There's no doc type declared for one which should help.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2574201 Photo


Registered User
14 posts

Hi Eric,

Your comments go over my level of competence, sorry!
Validate? Which means? No doc type? Could you give an example?
(Btw, is it the ....Gen10be.html page you are refering to?)
Altough I have produced and maintained my one and only website for quite a number of years my knowledge of html is still very limited so please descend to novice-level so that I can understand!

What I know, however, is that during the years mentioned above I have not had any problems with scandinavian chracters but now when using S-drive I have. I know exactly what work-around to use to get the display ok but as that entails making significant changes, not to my application but to to a piece of third-party software I think that is not a viable long term solution.
The software in question might produce non-standard html-code (no doc-type??) but nevertheless that code has given me properly displaying webpages up to now. Uploading those same pages through s-drive does not produce proper results.

The question is: Have I missed something or am I doing something wrong in MY software or is QuickReport WebFilter producing invalid code or is it S-drive that is unable to handle certain types of valid code? Someone is doing something wrong here, If its me I'll be happy to start rewriting my code!
-Lup

PS
Note that on my webpage å and ö display properly but my workaround has intentionally been disabled for ä in order to ilustrate the problem

.
User 187934 Photo


Senior Advisor
20,241 posts
Online Now

Click the validate link in my post.;)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.