CSV-UTF-8

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
GregWills
Posts: 69
Joined: Sun Aug 30, 2015 7:51 am

CSV-UTF-8

Post by GregWills » Thu Jun 06, 2019 8:57 am

Hi All

A question regarding the exporting of data into a csv file in Livecode.

Joomla requires data to be imported as a "CSV file that must be UTF-8 without BOM encoded".

When I export data as a csv file from Livecode it won't import into Joomla. BUT, when I export this (Livecode exported) file from Numbers to a csv (Unicode(UTF-8) file it imports into Joomla.

Is there a way to export data from Livecode to this format?

Thanks

Cheers
Greg

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: CSV-UTF-8

Post by sphere » Thu Jun 06, 2019 9:49 am

Hi Greg,

where in Joomla is CSV required?
Is it a plugin or module or component?
Or are you talking about the database?

Could you be more specific?

If it is the database, you could write a script to insert directly into the database from LC. Even if it are tables from Joomla itself.

Regards,
Sphere

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: CSV-UTF-8

Post by Thierry » Thu Jun 06, 2019 12:01 pm

GregWills wrote:
Is there a way to export data from Livecode to this format?
Hi Greg,

I believe if you're looking in the dictionary for
textEncode() and textDecode() that will make you happy...

Regards,

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

GregWills
Posts: 69
Joined: Sun Aug 30, 2015 7:51 am

Re: CSV-UTF-8

Post by GregWills » Thu Jun 06, 2019 1:56 pm

Thanks for your reply Sphere. I wasn’t aware that I could insert data directly into Joomla from LC. Yes, I am wanting to do updates into the database. Any pointers on how to do this would be greatly appreciated.

Thanks also to Thierry for the hint. I’ll check it out tomorrow. Time for bed here in Oz!

Cheers
Greg

sphere
Posts: 1145
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: CSV-UTF-8

Post by sphere » Thu Jun 06, 2019 8:33 pm

If it's just you who needs to update/change anything in the Joomla DB then you can use LC's internal database functions greatly. Take a look at revdatabase funstions in the dictionary or here on the forum.
If your Joomla installation is hosted somewhere then you might need to add your IP address to for example cPanel or similair to gain access from your pc to the DB.
If your Joomla is running locally then you don't need to do that.

If others need to change anything in your DB (which i don't expect) when Joomla is on shared host or something then you ight need a middleware like PHP or LC-server to get access to the DB, the server sees it then as local.(e.g. like here: https://forums.livecode.com/viewtopic.php?f=12&t=27521)

But you need to know in which table of course where you want something to change or whatever.
In any case local(e.g. XAMP) or on a hosting service you can open https://127.0.0.1/phpmyadmin or https://yourawesomesite/phpmyadmin log-in and check how the Joomla DB is setup.
The save way is of course to do it on a local site instead of a production (live) site.

GregWills
Posts: 69
Joined: Sun Aug 30, 2015 7:51 am

Re: CSV-UTF-8

Post by GregWills » Thu Jun 06, 2019 11:10 pm

Brilliant. Thanks for your time to explain the process. That is a whole new world for me, but I will explore it to see where it takes me. Once I get my current export/import approach sorted, I will investigate your suggestions and see if it is something I could achieve.

Many thanks

Cheers
Greg

Post Reply

Return to “Databases”