Jump to content
PLEASE READ - Webmaster Support Forum
This forum will be retired in the near future. Please direct all queries to our dedicated GitHub support page https://github.com/vatsimnetwork/developer-info/discussions 
Here you can find documentation on our services and we are continuing to migrate pertinent information into the Wiki pages https://github.com/vatsimnetwork/developer-info/wiki

Charset issues with vatsim registration page


John Moen 988121
 Share

Recommended Posts

As i'm pretty new to this forum, i will start with introducing my self

 

My name is John Moen, 26 year old, and i'm the current Webmaster for vACC Scandinavia.

 

Well, enough about me... to the point:

 

A couple of weeks ago our web-hosting provider had a hardware crash(SAN hardware crash) which resulted in loss of all data, as the provider only had a local copy of files, and not a proper backup.

 

We managed to redirected DNS to a temporarily server, where we put up a temp site with the most important features to keep the vacc up running.

 

As we are now working on a completely new site, we had to import the membership database from VATEUD.

as i went through the membership database, i noticed ch[Mod - Happy Thoughts]t missmatches in some of the rows.

I then contacted Vateud just to check if they had missmatches in the same rows, and they did. It was claimed that the data from vatsim membership database was in mixed ch[Mod - Happy Thoughts]ts.

 

After hours of sourcecode and researching i think we have found the root of the problem, and i was hoping that someone with the correct access to the Vatsim registration page files could help us out by correcting this globaly(vatsim wise).

 

Ch[Mod - Happy Thoughts]t is a bitch to handle globaly,since everybody code their pages in their local character sets, and forgets to set the ch[Mod - Happy Thoughts]t attribute in the meta tag in the header of HTML docomeents.

Every IDE have options for encoding web docomeents.

You'll have to specify it explit by writing a meta tag in the HTML header to tell the browser how to encode the text and the inputs, otherwise the browser will try its best to autodetect it, and it will be garatee to fail in most cases.

 

In the vatsim registration process, ( http://cert.vatsim.net/vatsimnet/step1.php ) no ch[Mod - Happy Thoughts]t definition is set, which will result in the web-browser trying to detect it, and if it succeds, well thats ok, but if it don't, it will end up encoding every in/output in the

default browser ch[Mod - Happy Thoughts]t(The ch[Mod - Happy Thoughts]t that is natively the same as the language the webbrowser is installed in), and not the same ch[Mod - Happy Thoughts]t as your database uses.

 

I have noticed that the Vatsim Registration page is encoded in ISO-8859-1, but my browser defaults to UTF-8, which causes a missmatch.

 

 

charset1.jpg

charset2.jpg

 

* The first image shows the ISO-8859-1 encoded Vatsim registration page in UTF-8 because no meta ch[Mod - Happy Thoughts]t is set in the HTML header

* The second image shows the ISO-8859-1 encoded Vatsim registration page in ISO-8859-1, but i had to set it manually because the browser failed to detect it.

 

 

An example from the databse:

872392 Per-Erik Hoddø 1 <-- Autodetection went well

873132 Werner Rafteseth 8

875065 Geir Gr�nlien 5 <-- Autodetection failed(should be: Geir Grønlien)

 

By defining the encoding in HTML header these missmatches won't happend.

 

I was hoping we could end up on UTF-8 on all vatsim webservices including VACC and Divisions , since UTF-8 has every characters in the Latin alphabet + special chars.

 

HTML meta ch[Mod - Happy Thoughts]t:

phpfunction for UTF-8 encoding and decoding: utf8_encode(); & ut8_decode();

 

Forms can also be set to a certain ch[Mod - Happy Thoughts]t by defining the accept-ch[Mod - Happy Thoughts]t="UTF-8" attribute in the

tag.

 

I was hoping the correct person could define : in the header of all the non-CMS pages for registration and membership services.

 

Best regard

 

John Moen

Accsca11 - vACC Scandinavia

Webmaster and Developer http://www.Vatsim-Scandinavia.org

Link to comment
Share on other sites

 Share

×
×
  • Create New...