Jump to content

Recommended Posts

Hi, I'm using fgetcsv to read a csv file and cycle through it but I think the file is in a weird encoding. When I run strlen on any of the values it returns twice the length minus 1 that it should (e.g. for a string of length 5 it returns 9). Any ideas what it might be and how I can convert them to 'normal' encoding so I can do some string comparisons. I have tried truncating the strings with substr and can see that the extra length is per character rather than extra padding at the start end. Any help much appreciated it's been driving me crazy!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.