Get EasyTable Pro !

Get a Subscription for EasyTable Pro!
(
The current version is emailed to you when your subscription is payed.
Existing Subscribers can download here

Saturday May 19 , 2012
Font Size
   

Why does my Alias have 'q' on either side of it?

Normally

Example Column Heading creates an alias example-column-heading

The Problem

Example Column Heading creates an alias qexample-column-headingq

Discussion

The EasyTable component imports text files in a CSV format.

Originally text files were all ASCII files but now with the advent of the Internet and multi-byte character sets there are lots of different encoding formats. Combine this with PHP & server settings and different Operating System platforms and it's very easy to get a file that has been exported incorrectly.

If you have a decent text editor you can do a "hex dump" and see what is actually in the file. For example, this recent file looked like this dumped:

00000000: EF BB BF 22 52 65 73 75 	Ôªø"Resu 
00000008: 6C 74 20 49 64 22 2C 22 lt Id","
00000010: 52 61 63 65 20 49 64 22 Race Id"
00000018: 2C 22 54 65 61 6D 22 2C ,"Team",
00000020: 22 44 72 69 76 65 72 20 "Driver
00000028: 23 31 22 2C 22 43 6F 75 #1","Cou
00000030: 6E 74 72 79 20 44 31 22 ntry D1"
00000038: 2C 22 44 72 69 76 65 72 ,"Driver

All those non alphanumeric characters tell us the file isn't properly encoded. The same file saved out as UTF-8 no BOM looks the way it should:

00000000: 22 52 65 73 75 6C 74 20 	"Result  
00000008: 49 64 22 2C 22 52 61 63 Id","Rac
00000010: 65 20 49 64 22 2C 22 54 e Id","T
00000018: 65 61 6D 22 2C 22 44 72 eam","Dr
00000020: 69 76 65 72 20 23 31 22 iver #1"
00000028: 2C 22 43 6F 75 6E 74 72 ,"Countr
00000030: 79 20 44 31 22 2C 22 44 y D1","D
00000038: 72 69 76 65 72 20 23 32 river #2

RSForm! Pro by RSJoomla!


RSForm!Pro is a powerful Joomla! form creator, helping you to create custom forms in minutes. The new product makes form management much easier and gives you the time to handle your clients better.

For only €19.00 how can you go wrong?
 ( We've used it for years... Shouldn't you? )

Member Login