Created
April 29, 2012 23:01
-
-
Save ah01/2553754 to your computer and use it in GitHub Desktop.
FireLogger UTF-8 test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // this file is in utf-8 | |
| $json = '{"logs":[{"level":"debug","timestamp":1335428158.523,"message":"Žluťoučký kůň úpěl ďábelské ódy"}]}'; | |
| $res = str_split(base64_encode($json), 76); | |
| foreach($res as $k=>$v) { | |
| header("FireLogger-12345678-$k:$v"); | |
| } | |
| // try content in different charset | |
| header("Content-Type: text/plain;charset=cp1250"); | |
| echo iconv("utf-8", "cp1250", "Žluťoučký kůň úpěl ďábelské ódy"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment