| |

VerySource

 Forgot password?
 Register
Search
View: 649|Reply: 3

How to solve the generated static page is garbled, very urgent

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-20 20:40:01
| Show all posts |Read mode
The client is garbled without selecting the encoding method. Setting the encoding to automatic selection or utf-8 will be normal.
How to let users automatically use UTF-8 encoding as soon as they open it.

Other aspx files are normal

I have also added <meta http-equiv = "content-type" content = "text / html charset = utf-8" /> to the static htm file
Reply

Use magic Report

0

Threads

41

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-2-14 14:15:01
| Show all posts
Add-> fileEncoding = "utf-8" to web.config
<globalization fileEncoding = "utf-8" requestEncoding = "GB2312" responseEncoding = "GB2312" culture = "en-US" uiCulture = "en-US" />
Reply

Use magic Report

2

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-2-14 16:30:01
| Show all posts
Agree upstairs
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-14 19:15:01
| Show all posts
If it is mainly for Chinese users, use GB2312 when writing static pages.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list