Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

242
Views
¿Por qué no puedo mostrar los caracteres CJK normalmente en nginx?

Entorno: Windows 10 + nginx/1.8.0. Los archivos en el directorio mysql están todos en codificación UTF-8, y todos los archivos HTML en mysql contienen <meta charset="utf-8" /> .

Mi archivo de configuración para el archivo nginx.conf :

 worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; charset gbk,utf-8; source_charset gbk,utf-8; autoindex on; location / { root d:/mydoc/build/html; index index.html index.htm; charset gbk,utf-8; source_charset gbk,utf-8; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }

Inicio mi servidor nginx y abro el directorio mysql en Firefox:

Ingrese la descripción de la imagen aquí

Todos los caracteres CJK se muestran correctamente. Ahora para hacer clic en el tercer tercer título---- mysql日志.html :

Ingrese la descripción de la imagen aquí

Muestre el archivo error.log para verificar qué sucedió:

 2020/12/05 22:41:19 [error] 11252#11076: *8 CreateFile() "d:/mydoc/build/html/mysql/mysql日志.html" failed (2: The system cannot find the file specified), client: 127.0.0.1, server: localhost, request: "GET /mysql/mysql%C8%D5%D6%BE.html HTTP/1.1", host: "127.0.0.1", referrer: "http://127.0.0.1/mysql/"

Ingrese http://127.0.0.1/mysql/mysql日志.html en mi Firefox y haga clic. Todos los caracteres CJK se muestran correctamente.

Ingrese la descripción de la imagen aquí

¿Cómo resuelvo el problema de que salta a una página web que contiene caracteres CJK ilegibles cuando hago clic en el título en 127.0.0.1/mysql ?

Se verifica que para el mismo directorio y archivos, el carácter CJK se puede mostrar correctamente en nginx + Linux en lugar de nginx + Windows .

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Siguiendo la guía de alibabacloud , mi mejor suposición es que debe usar solo charset utf-8 y también debe verificar que todos los nombres de archivo estén en formato UTF-8 o convertir a UTF-8 de lo contrario (solo nombres de archivo, no el contenido).

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!