简体   繁体   中英

Yii wrong encoding(UTF-8) in searchForm Lable

I have a problem in my view fromm SearchForm in a Yii Project. In the lables there are <?> <?> instead of "ä,ö,ü" but this error is only in the searchForm, the rest of the page works fine.

The file is correctly saved in UTF-8 and the Utf 8 Charset is also set in Header of the Main.php and the same aplies for the DB.

Has anyone an idea for a solution? Many thanks in advance for your support!

Check the

Apache configuration (in httpd.conf or .htaccess)

Whether its UTF8 or Windows 1252

AddDefaultCharset utf-8 PHP (in php.ini)

default_charset = "utf-8"
mbstring.internal_encoding=utf-8
mbstring.http_output=UTF-8
mbstring.encoding_translation=On
mbstring.func_overload=6

also use mb_detect_encoding for debugging to check where the data gets currupted

http://php.net/manual/en/function.mb-detect-encoding.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM