Topic: PHP error htmlentities($strText, ENT_COMPAT, QApplication::$EncodingT

Hi, I'm an admin not a programmer, so yes, enough knowledge to be dangerous...

A user is working with data in Excel (importing data from a csv, working with it, and saving in Excel).  The Excel file is saved as a csv, and then this csv gets uploaded into Tracmor.  Because of some characters in the csv file, Tracmor ends up throwing this error after logging in:

tracmor return htmlentities($strText, ENT_COMPAT, QApplication::$EncodingType);

The character that seems to be responsible is a double-length dash, presumably where a user has used an application like Excel or Word and entered a single dash between two words and a space ("like - this") and the Excel / Word autocorrect has changed the single dash to a double-length dash.

I found this character in the asset_model_code of the asset_model table.  Using MySQL I was able to remove this character and now Tracmor is working correctly.

It looks as if Excel is mangling the data when it's imported.  From what I read, by default Excel (2007 in my case) will open a csv file when double-clicked and process the encoding as ASCII.  Some people call this a bug in Excel.  If I use Excel to manually import the text, the import wizard gives me options, and if I import with encoding UTF-8 then the resulting csv file will always import into Tracmor just fine and not give any error.

So, my question is:  Is this my problem, as I am essentially generating some garbage that I am importing in Tracmor, or is this a problem with Tracmor as it's not validating the data that's imported into it?  Or is this a problem elsewhere?

IIS 6, Server 2003
PHP 5.2.9
Tracmor 0.3.0
MySQL 5.1.11

Thanks!
Andy

Re: PHP error htmlentities($strText, ENT_COMPAT, QApplication::$EncodingT

Check out my post here. Follow those 3 steps and see if that solves your problem.

Justin Sinclair

Got Inventory? Get Tracmor.