OT: Problems with Inserting Odd Characters into PostGreSQL

Bob Sneidar bobs at twft.com
Mon Dec 13 15:50:58 EST 2010


If I am not mistaken, your database columns need to be defined as UTF16 or something along that order. I don't believe UTF8 will support foreign characters. I may be mistaken on the type of formatting (I never need to use "foreign" characters so I have no actual experience) but I think the principle is sound. 

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