From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1702 invoked by alias); 6 Jul 2013 15:41:24 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 1657 invoked by uid 48); 6 Jul 2013 15:41:18 -0000 From: "krichter722 at aol dot de" To: glibc-bugs@sourceware.org Subject: [Bug libc/10460] "iconv" corrupts all files over 17 KB from UTF8 to UTF16 Date: Sat, 06 Jul 2013 15:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.17 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: krichter722 at aol dot de X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc version resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00023.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=10460 Kalle Richter changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |krichter722 at aol dot de Version|2.9 |2.17 Resolution|WORKSFORME |--- --- Comment #3 from Kalle Richter --- This behavior persists in iconv (Ubuntu EGLIBC 2.17-0ubuntu5) 2.17 if you choose input file and output file to be the same (maybe only on an x86_64). Did you one try to reproduce the error with a set of identical input and output files? If I process the files in the following python script (using temporary files) everything works fine: #!/usr/bin/python import os import tempfile import shutil # The intention of this script is to avoid error "bus error" when processing file iconv with identical input and output file for (dirpath, dirnames, filenames) in os.walk("/home/richter/sources/Aristoteles", topdown=True, onerror=None, followlinks=False): #print(dirpath, dirnames, filenames) for filename in filenames: _file = os.path.join(dirpath, filename) #print(_file) file_ext_pair = _file.split(".") if len(file_ext_pair) > 1 and file_ext_pair[len(file_ext_pair)-1] == "java": _tempfile = tempfile.mkstemp()[1] os.system("iconv -f ISO-8859-15 -t utf-8 \""+_file+"\" -o \""+_tempfile+"\"") os.remove(_file) shutil.move(_tempfile, _file) -- You are receiving this mail because: You are on the CC list for the bug.