I am performing a few sql queries and pushing the data into a txt file. However on a certain field i am receiving the following result: C32.2��
When the data is pushed to a txt document it appears as: C32.2??
I am unable to just remove the last 2 characters as this field result changes with each query.
I have not been able to find any information on removing special characters within Lua.
When i use db.connect – use_unicode=true the �� disappear however in the outputted txt document 4 ?’s appear
Has anyone seen this issue before or have any ideas on how i should attack it?
Find in module stringutil example how to trim trailing space characters, and create your own new functions by modifying example. Change ASCII value of space and tab characters by ASCII values of characters you need to remove.
I think you should figure out what encoding the incoming data is in and make sure you have that configured correctly. Iguana uses a local mapping library that can take various external encodings and map them internally into UTF8 if that is not set right then you don’t have proper UTF8 encoding internally and problems will occur…
I discovered when i copied the data directly from SQL and copy them into say word there were 2 spaces on the end which were actually characters.
I then discovered when this data was added through our software it was copied from an excel spreadsheet so i had to go back into the software and manually change these values by removing the 2 ending spaces.
You must be logged in to reply to this topic.