Universal Data Exporter PHP Support Product Page

Special characters

Asked 11 Nov 2009 14:26:47
1
has this question
11 Nov 2009 14:26:47 Andre Bender posted:
Is there any chance to export special charaters like ä ö é etc. to an excel file? I don't see any possibilites to select charset=ISO-8859-1 or anything similar.

Replies

Replied 12 Nov 2009 08:10:35
12 Nov 2009 08:10:35 Patrick Julicher replied:
Hi Andre,

A fix for the problems regarding special characters would be to set the encoding of the page containing your data to ISO-8859-1 instead of UTF-8. You can do this in Dreamweaver under Page properties>Title/Encoding.

Kind regards, Patrick
Replied 12 Nov 2009 19:41:52
12 Nov 2009 19:41:52 Nicolas K. replied:
Sorry I can not make it to work with åäö (swedish caractere)
excel export:

The data in mysql is stored as utf-8
the page/export is utf-8
then when I export it show the caractere as in mysql (like utf-8 strange caractere).

I tested to change the export page to ISO-8859-1 or even central euro… but nothing,

I did a test to change the data in mysql as latin(iso) and than the page as latin(iso) than it work, But if any one have a solution where I do not need to change mysql data, that will make my life much better (need to change to many thing otherwise!)

I did a test with CSV and it work but it export the full recordset not only the one I selected in the dmxexpoter panel ? strange…
thks
Nikko

Edited by - Nicolas fraggleway on 12 Nov 2009  20:05:32
Replied 13 Nov 2009 18:27:26
13 Nov 2009 18:27:26 Andre Bender replied:
QuoteHi Andre,

A fix for the problems regarding special characters would be to set the encoding of the page containing your data to ISO-8859-1 instead of UTF-8. You can do this in Dreamweaver under Page properties>Title/Encoding.

Kind regards, Patrick


The page IS encoded with ISO-8859-1. That's the strange thing about it.
Replied 23 Nov 2009 17:17:16
23 Nov 2009 17:17:16 Andre Bender replied:
No solution!? No reply!?
Replied 03 Mar 2010 14:51:37
03 Mar 2010 14:51:37 Rune Brynestad replied:
Try to add this line at the end of your connection string:

mysql_query ('SET NAMES `latin1`');

Works for me.

Regards
Rune
Replied 15 Mar 2010 18:37:26
15 Mar 2010 18:37:26 Nicolas K. replied:
no solution ?

When I change on the dmxDataExporter file in xml:

$outputString .= "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
than it works for xml.

but not for anything else…

I really need to make it work with UTF-8 for PDF or XLS…

Any help will appreciate,
I did tried mysql set latin, but no…

(need for php4… )

The strange think, that it is working 100% with Mac !



Edited by - Nicolas fraggleway on 15 Mar 2010  18:55:13
Replied 22 Apr 2010 00:41:28
22 Apr 2010 00:41:28 Willy Gelin replied:
I would by this extension if it did support UTF-8. It's not an option to rewrite a complete site with a comprehensiv database to make it work.
Replied 22 Apr 2010 17:32:31
22 Apr 2010 17:32:31 Rune Brynestad replied:
You don't have to rewrite a complete site with a comprehensive database to make it work.

You need two connection files, one for the page that use the Universal Data Exporter PHP extension and one for the other pages.

your regular connection file could be like this:
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conYoursite = "your_host";
$database_conYoursite = "your_database";
$username_conYoursite = "your_username";
$password_conYoursite = "your_password";
$conYoursite = mysql_pconnect($hostname_conYoursite, $username_conYoursite, $password_conYoursite) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_query ('SET NAMES `utf8`');
?>

Your Universal Data Exporter connection file could be like this:
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conYoursiteDataExporter = "your_host";
$database_conYoursiteDataExporter = "your_database";
$username_conYoursiteDataExporter = "your_username";
$password_conYoursiteDataExporter = "your_password";
$conYoursiteDataExporter = mysql_pconnect($hostname_conYoursiteDataExporter, $username_conYoursiteDataExporter, $password_conYoursiteDataExporter) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_query ('SET NAMES `latin1`');
?>

Then you could include this file for your regular pages:
<?php require_once('Connections/conYoursite.php'); ?>

and this file for the page that use the Universal Data Exporter PHP extension:
<?php require_once('Connections/conYoursiteDataExporter.php'); ?>

Hope this helps.

Regards
Rune
Replied 22 Nov 2010 13:57:16
22 Nov 2010 13:57:16 Nicolas K. replied:
Yep…

But doesn't work with Swedish letter
with basic Latin accent yes
but not with special character ( Å ) … did try…
nikko

Reply to this topic