CSV-UTF-8

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
GregWills
Posts: 67
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: 918
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
2018 Worldwide Mobile Market share: Android 84.4% !!!, iOs 15.1%, others 0.1%

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 648
Joined: Wed Nov 22, 2006 3:42 pm
Location: France
Contact:

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
Thierry Douez - https://sunny-tdz.com
Pourquoi tant de notes lorsqu'il suffit de jouer les plus belles... [Barbara]

GregWills
Posts: 67
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: 918
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.
2018 Worldwide Mobile Market share: Android 84.4% !!!, iOs 15.1%, others 0.1%

GregWills
Posts: 67
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”