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

344
Views
Apache won't working on UTF-8 how can I solve this

I've installed apache on my windows 10 and set the things for python and it can run .py files thats ok. But however I can't use the letter "ş" cause apache encode is not setted for utf-8 but I already added the AddDefaultCharset UTf-8 in my httpd.conf file. But when I try to open my index file I'm getting this error

UnicodeEncodeError: 'charmap' codec can't encode character '\\u015e' in position 554: character maps to <undefined>\r: C:/www/index.py

So how can i solve this problem?

and this is my index file

#!C:\Users\doganalisan\AppData\Local\Programs\Python\Python39/python.exe
import page_elements as pe
import background
print("Content-Type: text/html\n\n")
print("""
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/style.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Semanur ŞAN</title>
<script src="https://kit.fontawesome.com/657430e951.js" crossorigin="anonymous"></script>
</head>
<body id="index">
<div class="container">
 """ + pe.header + """
 """ + pe.mobile_header+ """
 """ + str(background.indexaboutside()) + """
</div>
""" + pe.footer + """
</body>
</html>
""")

I've found the solution its so simple just adding this code on my files and its working fine

import sys
sys.stdout.reconfigure(encoding='utf-8')
over 4 years ago · Santiago Trujillo
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!