echo RAW data from unicode page?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • koteika@gmail.com

    echo RAW data from unicode page?

    How can I print raw data (string) from a UTF-8 .php file?

    Simple

    echo $var

    ouputs unicode string to browser (with unicode prefix bytes), but if I
    want to ouput BLOB data (jpeg file)?

    Help!

  • R. Rajesh Jeba Anbiah

    #2
    Re: echo RAW data from unicode page?

    koteika@gmail.c om wrote:[color=blue]
    > How can I print raw data (string) from a UTF-8 .php file?
    >
    > Simple
    >
    > echo $var
    >
    > ouputs unicode string to browser (with unicode prefix bytes), but if I
    > want to ouput BLOB data (jpeg file)?[/color]

    Samething, but with the proper headers set.
    <http://in2.php.net/header>

    eg. <p>foo foo <img src="image.php" /> </p>

    --
    <?php echo 'Just another PHP saint'; ?>
    Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

    Comment

    • Andy Hassall

      #3
      Re: echo RAW data from unicode page?

      On 28 Sep 2005 16:42:04 -0700, koteika@gmail.c om wrote:
      [color=blue]
      >How can I print raw data (string) from a UTF-8 .php file?[/color]

      OK, first things first - what do you define as a "UTF-8 .php file"?
      [color=blue]
      >Simple
      >
      >echo $var
      >
      >ouputs unicode string to browser (with unicode prefix bytes), but if I
      >want to ouput BLOB data (jpeg file)?[/color]

      You just output it. PHP knows very little about character encodings in the
      first place; when you print, it always prints raw bytes. How they're
      interpreted by the client depends on the Content-type header sent to the
      browser.
      --
      Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
      http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

      Comment

      Working...