ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: Stripping UTF8 from variables.
by Duncan Cameron other posts by this author
Jan 16 2002 5:06AM messages near this date
view in the new Beta List Site
RE: [ANNOUNCE] XML::SAX::2Simple | Re: [ANNOUNCE] XML::SAX::2Simple
On 2002-01-15 Terrence Martin <twm139@[...].to>  wrote:
> Hello. I just wanted to post again regarding this issue of stripping the 
> UTF8 flag from perl variables. 
> 
> The reason I want to do this is so that I can pass variables derived from 
> a XML document to the Net::SSH::Perl module.
> 
> Now the suggestion I have been given that appears to work is to assign a 
> variable to itself using quotes. I have included an example script. 
> 
> What I wanted to know is if this is "correct" ie it is not some bug I am 
> exploiting, of if there is a "better" way to strip the UTF8 flag off of a 
> perl variable? Are there any problems with this approach?

A couple of points, as it was my suggestion, ):

1)  I note from your original post that you're using 5.6.0. I just did a 
search on Google for utf8 and it looks as if utf8 support in 5.6.0
was very unfunctional, to quote:

There are no "new utf8 handling capabilities" in v5.6.0.  What there
is there is a potential to have these capabilities in the future.  In
addition to zillions of bugs there is no way to handle a mixture of
utf8 and no-utf8 data in hashes and RExen.  And there is no i/o
capabilities...

Can you upgrade to 5.6.1 or later?

2) Net::SSH::Perl seems to include compression and encryption, both of
which need to mess round at the _byte_ level, not the character level.
So again it sounds possible that the algorithms  used don't work
with utf8 encoded data, or at least won't work correctly unless both
ends are aware that they are using utf8.

Regards

Duncan

_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-xml

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved