BUG when exporting as CSV

(2 posts) (2 voices)

Tags:

No tags yet.

  1. maron, Member

    Hello.

    When exporting as CSV a report that worked a month ago I suddenly get this as the contents of the csv file. The report itself works fine in the browser.


    <b>Fatal error</b>: Uncaught ValueError: mb_convert_encoding(): Argument #2 ($to_encoding) must be a valid encoding "utf8mb4" given in /usr/share/nginx/html/corey/lib/export.php:2987
    Stack trace:
    #0 /usr/share/nginx/html/corey/lib/export.php(2987): mb_convert_encoding()
    #1 /usr/share/nginx/html/corey/lib/export.php(3090): mydbrExport->fputcsv()
    #2 /usr/share/nginx/html/corey/lib/export.php(3080): mydbrExport->csv_headers()
    #3 /usr/share/nginx/html/corey/lib/export.php(3134): mydbrExport->export_csv_init_rs()
    #4 /usr/share/nginx/html/corey/lib/export.php(4004): mydbrExport->export_csv()
    #5 /usr/share/nginx/html/corey/apps/showReport.php(10387): mydbrExport->print_report()
    #6 /usr/share/nginx/html/corey/apps/showReport.php(9): sg_load()
    #7 /usr/share/nginx/html/corey/report.php(559): require_once('...')
    #8 /usr/share/nginx/html/corey/report.php(9): sg_load()
    #9 {main}
    thrown in <b>/usr/share/nginx/html/corey/lib/export.php</b> on line <b>2987</b>

  2. myDBR Team, Key Master

    Hi,
    Sounds like you have CSV export option defined as:

    select 'dbr.export.options', 'csv.charset','utf8mb4';

    The csv.charset option defines the exported CSV file's character set (UTF-8, UTF-16, ISO-8859-1 etc).

    The 'utf8mb4' is internal definition for MySQL/MariaDB character encoding support for Unicode characters. Not a file character set.

    --
    myDBR Team


Reply

You must log in to post.