473,396 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Wide character in syswrite at /usr/share/perl/5.8/Net/Cmd.pm line 430

Hello,

Does anyone know what this error message means?
"Wide character in syswrite at /usr/share/perl/5.8/Net/Cmd.pm line 430"

I have a script that processes a lot of html files.
I've tried to find where it happens in my code and I think the error happens on the line with the following information :
$minutes = `cat $abs_path/$link`;

It sometimes processes some html pages without troubles and on other pages my script is terminated with this error.
I know it has something to do with unicode, but when I open an html page where it goes wrong, I see no weird characters.

Anyone any idea as to how I can fix this?
thx in advance,
kalliet
Sep 7 '07 #1
1 5412
KevinADC
4,059 Expert 2GB
It does have to do with unicode, but you should not be using this for simpy printing the lines of a file with perl:

Expand|Select|Wrap|Line Numbers
  1. $minutes = `cat $abs_path/$link`;
You should use perls open() function and read the file instead of shelling out to the cat command.

Expand|Select|Wrap|Line Numbers
  1. open (FH, "$abs_path/$link") or die "$!";
  2. my $minutes = do {local $/; <FH>};#read all lines into a scalar (slurp-mode)
  3. close FH;
  4. print $minutes;
  5.  
Sep 8 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jonathan Mcdougall | last post by:
I started using boost's filesystem library a couple of days ago. In its FAQ, it states "Wide-character names would provide an illusion of portability where portability does not in fact exist....
8
by: Brand Bogard | last post by:
Does the C standard include a library function to convert an 8 bit character string to a 16 bit character string?
4
by: thinktwice | last post by:
i'm using VC++6 IDE i know i could use macros like A2T, T2A, but is there any way more decent way to do this?
1
by: iwongu | last post by:
Hi, I have a question about std::wcout and its underlying C functions. According to C99, a stream have an orientation type that is one of byte-oriented or wide-one, and it is determined by the...
44
by: Umesh | last post by:
Plese help. Is there any software by which we can do that?
17
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when...
4
by: Aggelos | last post by:
Hello, I have developed a content management system and every time I want to create some short of server wide repository of the classes I am using. So when I update a bug I don't have to go and...
3
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class....
16
by: Martin Rinehart | last post by:
In a review of seven conventions documents I found two that addressed file width. Crockford says 80; Nextapp says 132. I like 80 so I can see several files at once on my wide monitor. Thoughts?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.