Good day,

Could you post this mystery string so that we could help you?

Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948

-----Original Message-----
From: Gil Disatnik [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 1:12 PM
Subject: [PHP] strlen() gives a wrong count

Hello there,

I have a 98 characters string (including spaces), wc -c says it's 98 
characters and a file containing this string is 98 bytes as well.

For some reason - strlen() says it's more... it says it's a 104 characters 
strings, when I removed the spaces (using sed on the shell and using 
str_replace on php) - wc said it's 83 characters and strlen() said it's

How could that be? is there another way to get the exact number of 
characters in a string?



Gil Disatnik
UNIX system/security administrator.


"Windows NT has detected mouse movement, you MUST restart
your computer before the new settings will take effect, [ OK ]"
Windows is a 32 bit patch to a 16 bit GUI based on a 8 bit operating
system, written for a 4 bit processor by a 2 bit company which can
not stand 1 bit of competition.

PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to