Donate Share

Owl Intranet Knowledgebase

Tracker: Bugs

5 Bulk download encoding error - ID: 2890758
Last Update: Settings changed ( b0zz )

When you make a bulk download with accent in folder or file, we have a
encoding problems.

The patch fix it.


Julien HEYMAN ( jheyman ) - 2009-11-02 15:44

5

Closed

Fixed

Steve

None

None

Public


Comment ( 1 )

Date: 2009-11-02 16:19
Sender: b0zzProject Admin

I believe this is already fixed in owl 1.00a Here is my function:

owl.lib.php

function pclzip_convert_filename_cb($p_event, &$p_header)
{
global $default;

if ($p_event == PCLZIP_CB_PRE_EXTRACT)
{
// contributed code $p_header['filename'] = iconv("IBM437", "UTF-8",
$p_header['filename']);
$p_header['filename'] =
iconv($default->extract_convert_from_charset,
$default->extract_convert_to_charset, $p_header['filename']);
}
elseif ($p_event == PCLZIP_CB_PRE_ADD)
{
//$p_header['stored_filename'] = iconv("ISO-8859-1", "cp850",
$p_header['stored_filename']);
$p_header['stored_filename'] =
iconv($default->add_convert_from_charset, $default->add_convert_to_charset,
$p_header['stored_filename']);
// contributed code $p_header['stored_filename'] =
iconv("ISO-8859-1", "IBM437", $p_header['stored_filename']);
}
return 1;
}

owl.php:

// *******************************************************
// When a zipfile that was created on Windows with special
// characters and extracted on linux (UTF-8) the special
// characters did not come through correctly
// *******************************************************
//$default->convert_from_charset = "IBM437";
//$default->convert_to_charset = "UTF-8";
$default->extract_convert_from_charset = "cp857";
$default->extract_convert_to_charset = "UTF-8";

$default->add_convert_from_charset = "ISO-8859-1";
$default->add_convert_to_charset = "cp850";



Attached File ( 1 )

Filename Description Download
0001-Corrections-des-accents-sur-zip.patch Download

Changes ( 6 )

Field Old Value Date By
status_id Open 2009-11-02 16:19 b0zz
resolution_id None 2009-11-02 16:19 b0zz
assigned_to nobody 2009-11-02 16:19 b0zz
allow_comments 1 2009-11-02 16:19 b0zz
close_date - 2009-11-02 16:19 b0zz
File Added 349200: 0001-Corrections-des-accents-sur-zip.patch 2009-11-02 15:44 jheyman