perl.unicode...Re: Fix UTF Encoding issue by mkoegler- December 4, 2007 On Tue, Dec 04, 2007 at 10:12:50AM +0200, Ismail Dönmez wrote:> I think just a better method is to use (not tested):> > if( is_utf8($str) ) > > return decode_utf8($str);> > else > return decode($str);> I already tried this function. It does not test, if a string isreally UTF-8. It seems to be to intended to check, if perl storesthe string internally in a multi byte encoding.mfg Martin Kögler.http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3132.html Re: Fix UTF Encoding issue by Ismail Dnmez- December 4, 2007 Tuesday 04 December 2007 10:47:39 Ismail Dönmez yazmıÅ&159;tı:> Tuesday 04 December 2007 10:44:12 Martin Koegler yazmıÅ&159;tı:> > On Tue, Dec 04, 2007 at 10:33:39AM +0200, Ismail Dönmez wrote:> > > Following to_utf8 function works for me :> >> > For me too (Debian sarge+etch).>> Thanks for testing.Use Perl built-in utf8 function for UTF-8 decoding.Signed-off-by:...http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3131.html Re: Fix UTF Encoding issue by mkoegler- December 4, 2007 On Tue, Dec 04, 2007 at 10:33:39AM +0200, Ismail Dönmez wrote:> Following to_utf8 function works for me :For me too (Debian sarge+etch).> sub to_utf8 > · my $str = shift;> > if(utf8::valid($str))> > utf8::decode($str);> > ·> return $str;In the original thread, there was some discussion, that some peoplemight want a different fallback endcoding. So mayme you.http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3130.html Re: Fix UTF Encoding issue by Wincent Colaiuta- December 4, 2007 El 4122007, a las 9:55, Ismail Dönmez escribió:> Tuesday 04 December 2007 10:47:39 Ismail Dönmez yazm&x131;&x15F;t&x131;:>> Tuesday 04 December 2007 10:44:12 Martin Koegler yazm&x131;&x15F;t&x131;:>>> On Tue, Dec 04, 2007 at 10:33:39AM +0200, Ismail Dönmez wrote:>>>> Following to_utf8 function works for me :>>>>>> For me too (Debian sarge+etch).>>>> Thanks for testing.>> Use Perl built-in utf8 function for...http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3129.html Re: Fix UTF Encoding issue by mkoegler- December 4, 2007 On Tue, Dec 04, 2007 at 09:55:04AM +0200, Ismail Dönmez wrote:> Tuesday 04 December 2007 Tarihinde 09:50:28 yazmt:> > The bug affects old versions of perl (Debian sarge = oldstable).> > As it works on the newer Debian etch, do you really think, that it is> > a good idea to report issue> > Same problem here with v5.8.8 which is latest stable perl5 release.I have put together a small perl script, which tests the various waysof decoding, which have been posted on...http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3128.html Re: Fix UTF Encoding issue by Ismail Dnmez- December 4, 2007 Tuesday 04 December 2007 10:44:12 Martin Koegler yazmıÅ&159;tı:> On Tue, Dec 04, 2007 at 10:33:39AM +0200, Ismail Dönmez wrote:> > Following to_utf8 function works for me :>> For me too (Debian sarge+etch).Thanks for testing.> > sub to_utf8 > > ·  my $str = shift;> >> >   if(utf8::valid($str))> >   > >  ...http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3127.html Re: Fix UTF Encoding issue by mkoegler- December 4, 2007 On Mon, Dec 03, 2007 at 06:02:54PM +0100, Jakub Narebski wrote:> On Mon, 3 Dec 2007, Martin Koegler wrote:> > eval $res = decode_utf8(...); > > if ($) > > return decode(...);> > return $res> > > > or> > > > eval $res = decode_utf8(...); > > if (defined $res)> > return $res;> > else> > return decode(...);> > > > show the same (wrong) behaviour on Debian sarge. They do not always> >...http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3121.html Re: Fix UTF Encoding issue by Ismail Dnmez- December 4, 2007 Tuesday 04 December 2007 Tarihinde 09:50:28 yazmıÅ&159;tı:> The bug affects old versions of perl (Debian sarge = oldstable).> As it works on the newer Debian etch, do you really think, that it is> a good idea to report issueSame problem here with v5.8.8 which is latest stable perl5 release.Regards,ismail-- Never learn by your mistakes, if you do you may never dare to try again.http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3122.html Re: Fix UTF Encoding issue by mkoegler- December 4, 2007 On Tue, Dec 04, 2007 at 08:16:24AM +1030, Benjamin Close wrote:> Jakub Narebski wrote:> >On Mon, 3 Dec 2007, Martin Koegler wrote:> >>On Mon, Dec 03, 2007 at 04:06:48AM -0800, Jakub Narebski wrote:> >>>Ismail Dönmez <ismailpardus.org.tr> writes:> >>>>Monday 03 December 2007 Tarihinde 12:14:43 yazmt:> >>>>>Benjamin Close <Benjamin.Closeclearchain.com> writes:> >>>>>>- eval $res =...http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3123.html Re: Fix UTF Encoding issue by Ismail Dnmez- December 4, 2007 Tuesday 04 December 2007 10:04:07 Martin Koegler yazmıÅ&159;tı:> On Tue, Dec 04, 2007 at 08:16:24AM +1030, Benjamin Close wrote:> > Jakub Narebski wrote:> > >On Mon, 3 Dec 2007, Martin Koegler wrote:> > >>On Mon, Dec 03, 2007 at 04:06:48AM -0800, Jakub Narebski wrote:> > >>>Ismail Dönmez <ismailpardus.org.tr> writes:> > >>>>Monday 03 December 2007 Tarihinde 12:14:43 yazmt:> >..http://www.nntp.perl.org/group/perl.unicode/2007/12/msg3124.html |