X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 4 Jan 2010 17:50:25 -0500 Message-ID: Subject: Re: Bug printing string where the 128th char is multibyte From: "Mark J. Reed" To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Mon, Jan 4, 2010 at 5:35 PM, Eric Blake wrote: > What you've found is a bug in your own program, at lesat for the BUG.c ve= rsion > of your report. The Perl and Python programs are not buggy, but they also don't exhibit the behavior for me. Although I'm still running a prerelease 1.7.0 Both also feature simpler ways to build the string, btw. Perl: my $str =3D '0123456789' x 13; substr($str,127,1) =3D '=C3=A7'; Python: str =3D '0123456789' * 13 str =3D str[:128] + '=C3=A7' + str[128:] --=20 Mark J. Reed -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple