Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Why tag->setDefault automatic convert unicode utf-8 text to unicode decmal

I'm new to Phalcon PHP and i'm testing Vietnamese characters and stuck at these. I use utf-8 to store text on db, on edit form Phalcon copy to setDefault and automatic convert utf-8 text to unicode decimal likes this.

In controller: $text = " â Ă ă Ð đ Ĩ ĩ Ũ ũ Ơ ơ Ư ư Ă ă Ạ ạ Ả ả Ấ ấ Ầ ầ Ẩ ẩ Ẫ ẫ Ậ ậ Ắ ắ Ằ ằ Ẳ ẳ Ẵ ẵ Ặ ặ Ẹ ẹ Ẻ ẻ Ẽ ẽ Ế ế Ề ề Ể ể Ễ ễ Ệ ệ Ỉ ỉ Ị ị Ọ ọ Ỏ ỏ Ố ố Ồ ồ Ổ ổ Ỗ ỗ Ộ ộ Ớ ớ Ờ ờ Ở ở Ỡ ỡ Ợ ợ Ụ ụ Ủ ủ Ứ ứ Ừ ừ Ử ử Ữ ữ Ự ự Ỳ ỳ Ỵ ỵ Ỷ ỷ Ỹ ỹ"; $this->tag->setDefault("fullname",$text );

the output HTML is automatic converted into: <input size="30" name="fullname" id="fullname" value=" � &#x102; &#x103; � &#x111; &#x128; &#x129; &#x168; &#x169; &#x1a0; &#x1a1; &#x1af; &#x1b0; &#x102; &#x103; &#x1ea0; &#x1ea1; &#x1ea2; &#x1ea3; &#x1ea4; &#x1ea5; &#x1ea6; &#x1ea7; &#x1ea8; &#x1ea9; &#x1eaa; &#x1eab; &#x1eac; &#x1ead; &#x1eae; &#x1eaf; &#x1eb0; &#x1eb1; &#x1eb2; &#x1eb3; &#x1eb4; &#x1eb5; &#x1eb6; &#x1eb7; &#x1eb8; &#x1eb9; &#x1eba; &#x1ebb; &#x1ebc; &#x1ebd; &#x1ebe; &#x1ebf; &#x1ec0; &#x1ec1; &#x1ec2; &#x1ec3; &#x1ec4; &#x1ec5; &#x1ec6; &#x1ec7; &#x1ec8; &#x1ec9; &#x1eca; &#x1ecb; &#x1ecc; &#x1ecd; &#x1ece; &#x1ecf; &#x1ed0; &#x1ed1; &#x1ed2; &#x1ed3; &#x1ed4; &#x1ed5; &#x1ed6; &#x1ed7; &#x1ed8; &#x1ed9; &#x1eda; &#x1edb; &#x1edc; &#x1edd; &#x1ede; &#x1edf; &#x1ee0; &#x1ee1; &#x1ee2; &#x1ee3; &#x1ee4; &#x1ee5; &#x1ee6; &#x1ee7; &#x1ee8; &#x1ee9; &#x1eea; &#x1eeb; &#x1eec; &#x1eed; &#x1eee; &#x1eef; &#x1ef0; &#x1ef1; &#x1ef2; &#x1ef3; &#x1ef4; &#x1ef5; &#x1ef6; &#x1ef7; &#x1ef8; &#x1ef9;" type="text" />

How to turn off this feature.

Thanks



84.5k
Accepted
answer

Try Phalcon\Tag::setAutoescape(false);

That works greate. Thanks