On-Rev: irev to mysql to html charset (apostrophes, etc.) confusion?
bobs at twft.com
Mon Oct 3 12:42:13 EDT 2011
How are you escaping your sql? Are you using the same method in your web app? If you are not, then I think this is probably the issue. I use sqlYoga and if I am not mistaken, it has it's own built in escaping. You may want to have a chat with Trevor Devore about this sort of thing.
You may want to check the charset of your sql database itself. If you don't ever expect to use a foreign language or exotic characters, then UTF8 should work fine.
On Oct 3, 2011, at 9:29 AM, John Patten wrote:
> Hi All!
> I have a LC project that pushes data to a on-rev mysql database. The data saves to the mysql fine, however, apostrophes and other some other punctuation get saved as "non-english" characters. If I request the data from the database via my LC project, everything gets pulled back correctly, apostrophes are apostrophes, question marks are question marks. However, when I pull the data from the database using an .irev script and display as html in web browser, apostrophes are not correct (questions marks in black box, or if I change the charset in the header of the irev script, a completely different non-english character appears.)
> How do I get my irev script to save content to database correctly, and get data displayed correctly when displaying in html in web browser?
> I have messed with changing the charset in header, i.e :
> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> ...in my irev script, but changing the charset only results in different characters. It's almost as if I have not found the correct charset? But yet, if my LC project pulls the content from the DB everything appears as it should???
> Thanks for any tips!
> John Patten
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode