Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Unicode > Item 75. Convert octet strings to character strings

Item 75. Convert octet strings to character strings

In a perfect world, your data would always know what their encodings were, and Perl could figure it out for you. Sadly, that’s not the real world. Someone hands you some bytes, Perl doesn’t know what encoding it should be, and it’s up to you to figure it out. Not only that, you might get data that specifies an encoding that is a lie.

The best advice is to ensure that you properly decode all of your input. That is, you have to take the octets and turn them into a proper character string. Don’t trust anything.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial