how to get the bytes of a UTF8 string

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jasongr
Forum Contributor
Posts: 206
Joined: Tue Jul 27, 2004 6:19 am

how to get the bytes of a UTF8 string

Post by jasongr »

Hello

I have a UTF8 encoded string.
Is it possible to get access to the string bytes?
If so, how
I need to perform some manipulations on them

regards
panoramical
Forum Newbie
Posts: 8
Joined: Mon Dec 27, 2004 6:34 am

Post by panoramical »

Would filesize() work?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

$string{0} - first byte,
$string{4} - fifth byte and so on...
jasongr
Forum Contributor
Posts: 206
Joined: Tue Jul 27, 2004 6:19 am

Post by jasongr »

thanks for the help
Post Reply