简体   繁体   中英

Some images not able to display in html

The images broken if the name are not in English, while all of the other images with English naming are able to display in the webpage.

在此处输入图片说明

The broken images are able to display if I enter the file path location in browser

For example www.myserver.com/files/image/你好.png

In what situation the image will not be able to display. All the file are store in the same directory and there is no problem with the linking of the files as all the files are using the same address to display.

Update For some reason, I'm using php code to validate the URL of image which causes the file name pass from database did not encode properly. I simply add mysqli_set_charset($conn,"utf8"); in the .php file then all images work fine.

It has something to do with encoding used in browser such as "UTF-8" and others. Look in that direction or just rename all images to english

You can try setting the character encoding to a Korean standard with a meta tag:

<meta charset="EUC-KR"> in the head of your document.

Here's a reference and further explanation of character sets and encoding.

尝试将语言代码更改为cnkr

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="cn"> ... </html>

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