How to store a ✓ in mySQL using livecode

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DavJans
Posts: 270
Joined: Thu Dec 12, 2013 4:21 pm
Location: Spokane, WA USA

How to store a ✓ in mySQL using livecode

Post by DavJans » Thu Dec 07, 2017 10:21 pm

If I use mySQL workbench and use this query I am able to store a check mark in the database just fine.

update cutlist set checkmark = '✓' where id = '2436'

However when I get data with livecode it is displayed as a ?

Also, if I use the exact same query as above from livecode, a ? is stored in the database.

If there is no way to make this work, a question mark is fine with me because the following code works just fine to make it look like a ✓

replace "?" with "✓" in pOutArrayA[ theField ]
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How to store a ✓ in mySQL using livecode

Post by jacque » Fri Dec 08, 2017 5:14 pm

This could be a text encoding issue. Run the command through textDecode before sending it to the database, and use textEncode on incoming data when retrieving it. I'd guess the db is using UTF8.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: How to store a ✓ in mySQL using livecode

Post by MaxV » Tue Dec 12, 2017 1:47 am

Use this:

Code: Select all

update cutlist set checkmark = '✓' where id = '2436' 
Then instead of text, use the htmlText property.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

DavJans
Posts: 270
Joined: Thu Dec 12, 2013 4:21 pm
Location: Spokane, WA USA

Re: How to store a ✓ in mySQL using livecode

Post by DavJans » Tue Jan 02, 2018 10:38 pm

Thank you guys for your help.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”