php and notepad unicode files

notepad unicode csvfiles have a 2 byte BOM (FEFF) and are UTF-16/UCS-2 little endian encoded

$ od -t x1z hot.csv | head
0000000 ff fe 48 00 6f 00 74 00 65 00 6c 00 49 00 44 00  >..H.o.t

$ od -t x2z hot.csv | head
0000000 feff 0048 006f 0074 0065 006c 0049 0044  >..H.o.t
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s