You are here: Re: convert byte array to unicode? « PHP Programming Language « IT news, forums, messages
Re: convert byte array to unicode?

Posted by Sergei Shelukhin on 11/06/07 22:26

On Nov 6, 2:37 am, yawnmoth <terra1...@yahoo.com> wrote:
> On Nov 5, 5:22 pm, Sergei Shelukhin <realg...@gmail.com> wrote:
>
> > Hi. I receive a byte array that contains utf-16 string (with a lot of
> > \0 characters :)) from a legacy system that holds some data that is
> > changed elsewhere. How do I convert it to an actual utf-16 string for
> > my app's purposes? I am using php 5.
>
> After outputting the byte order mark (either chr(0xFE).chr(0xFF) or
> chr(0xFF).chr(0xFE)) you'd just output the string as usual. If you're
> going to output this to HTML, you'd need to specify the charset. eg.
>
> header('Content-Type: text/html; charset=UTF-16');

What about passing it to linux command line application (script
really)?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация