OT: Problems with Inserting Odd Characters into PostGreSQL

Bob Sneidar bobs at twft.com
Mon Dec 13 16:04:55 EST 2010


A search of the LiveCode dictionary for encode reveals the uniEncode function. This might be what you are looking for. 

BTW (and please nobody hate me for saying so) (and this is not directed at the poster or anyone in particular) a LOT of enquiries on this list I find the answers for by doing simple finds in the LiveCode dictionary, or for other issues google searches. We should all make it a principle we code by that we try to find the solutions ourselves before posting. 

That being said, I learn a lot myself by looking up these things for other people. :-)

Bob


On Dec 13, 2010, at 12:00 PM, Sivakatirswami wrote:

> I'm a dbase - sql newbie when it comes to actually writing a web front end for capturing and inserting data into a database.  I can do code to read and use data, no problem, but this is my very first project where I actually all on my own without Andre's help, write a front end to accept input.
> 
> Using revServer I managed to copy some robust escape routines to validate and block malicious code (thanks to Rabit - RevIngniter Libraries)
> 
> but now I have this problem were people in foreign countries are using odd characters and for some reason the INSERT fails..
> 
> e.g
> 
> Paramparaís
> 
> a word used in a comment: the second character from the last  is a curly single possessive apostrophe before "s")...as it ended up in my log file where we do capture all the data in a text file... but it broke the INSERT, the dbase never got a record...
> 
> Another case of a registration from someone in Spain I get this in my text log file:
> 
> Address1: Avda. Europa 108, Urb. BarcelÛ Blq 11, 7 C
> Address2:
> City: M·laga
> State: M·laga
> Zip: 29003
> Country: Spain
> 
> but the database insertion fails. Can anyone help me with a LiveCode function that will "massage" these characters to escape them and pass them to the dbase (PostGreSQL) and be inserted?
> 
> TIA!
> 
> Sivakatirswami
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list