TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Kohana 3.3.0 Invalid multibyte sequence in argument
  • I am getting this error since 2 days now. I have checked every links over forums but still can't solved the issue. This error is coming while trying to instantiate a Model class $user=new Model_User(); And this is my Model User class Model_User extends Model_Auth_User {} I think the problem is coming from the encode character or something like that and the entire error is this: ErrorException [ 2 ]: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument ~ SYSPATH\views\kohana\error.php [ 52 ]

  • It seems you are just starting from the very beginning, perhaps it may be easier if you start a project from scratch (download kohana fresh, etc.)

  • Hmm. I haven't seen this before but you suggested that it might be an encode character?

    <?php echo htmlspecialchars( (string) $message, ENT_QUOTES, Kohana::$charset, TRUE); ?>
    

    By default, public static $charset = 'utf-8';

    I've got no further thoughts, but experimenting with that first seems like a good idea?

    If I was in this situation, I'd probably temporarily edit the error file and I'd do a Var::debug($message) to get an idea of what I'm working with.

  • I was getting this error on the server. Localy it used to work perfectly. I simple add '@' before of

    htmlspecialchars()

    in the

    error.php

    file on line 52 and everything went well. I just hope this was the solution for that.
    Thanks

  • Nice. I wonder if changing ENT_QUOTES to ENT_COMPAT would be a good alternative fix.

    Source:http://stackoverflow.com/questions/3803951/htmlspecialchars-invalid-multibyte-sequence-in-argument

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion