Skip to content

Commit 91c0af3

Browse files
undo non latin change
1 parent ed190bc commit 91c0af3

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

classes/Visualizer/Module/Chart.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,8 @@ public function exportData() {
539539
}
540540
}
541541
$fp = tmpfile();
542+
// support for MS Excel
543+
fprintf( $fp, $bom = ( chr( 0xEF ) . chr( 0xBB ) . chr( 0xBF ) ) );
542544
foreach ( $rows as $row ) {
543545
fputcsv( $fp, $row );
544546
}

classes/Visualizer/Source/Csv.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public function __construct( $filename = null ) {
6262
private function _fetchSeries( &$handle ) {
6363
// read column titles
6464
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
65-
$labels = array_map( 'utf8_encode', $labels );
6665
// read series types
6766
$types = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
6867

@@ -79,7 +78,6 @@ private function _fetchSeries( &$handle ) {
7978

8079
// re read the labels and empty types array
8180
$labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
82-
$labels = array_map( 'utf8_encode', $labels );
8381
$types = array();
8482
}
8583

@@ -107,10 +105,7 @@ protected function _get_file_handle( $filename = false ) {
107105
// set line endings auto detect mode
108106
ini_set( 'auto_detect_line_endings', true );
109107
// open file and return handle
110-
$fc = iconv( 'ISO-8859-1', 'utf-8', file_get_contents( $filename ? $filename : $this->_filename ) );
111-
$tmp = tempnam( sys_get_temp_dir(), rand() );
112-
file_put_contents( $tmp, $fc );
113-
return fopen( $tmp, 'rb' );
108+
return fopen( $filename ? $filename : $this->_filename, 'rb' );
114109
}
115110

116111
/**

languages/visualizer.pot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# This file is distributed under the GPL v2.0 or later.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Visualizer: Charts and Graphs Lite 2.1.3\n"
5+
"Project-Id-Version: Visualizer: Charts and Graphs Lite 2.1.5\n"
66
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7-
"POT-Creation-Date: 2017-06-01 12:45:19+00:00\n"
7+
"POT-Creation-Date: 2017-06-07 18:40:31+00:00\n"
88
"MIME-Version: 1.0\n"
99
"Content-Type: text/plain; charset=utf-8\n"
1010
"Content-Transfer-Encoding: 8bit\n"
@@ -102,7 +102,7 @@ msgid "Pro Addon"
102102
msgstr ""
103103

104104
#: classes/Visualizer/Module/Chart.php:298
105-
#: classes/Visualizer/Module/Chart.php:579
105+
#: classes/Visualizer/Module/Chart.php:581
106106
msgid "You have entered invalid URL. Please, insert proper URL."
107107
msgstr ""
108108

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=== WordPress Charts and Graphs Lite ===
2-
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
2+
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle,rozroz
33
Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
44
Requires at least: 3.5
55
Tested up to: 4.7.5

0 commit comments

Comments
 (0)