Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Windows and Utf-8

Aperta
#885 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
20/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
backend

Direzione di ricerca

Start with the LoadFile function in tinyxml2.cpp, where fopen_s is called on Windows without an encoding specifier, and compare it with the non-Windows fopen path. Read the Microsoft fopen_s documentation on the ccs=UTF-8 flag and decide how file paths with non-ASCII characters should be encoded on each platform. Done means the encoding choice is either implemented or documented, with a test or example that loads a file whose path contains a character like 'ƒ'.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

For the Windows compiler I noticed that fopen_s is used without an encoding specifier in LoadFile. According to the docs that means the file will be encoded ANSI rather than utf-8. I'm wondering if it should have the ccs=UTF-8 encoding specifier added explicitly.

In particular I am concerned about whether to supply the file path encoded ANSI or utf-8. This becomes a huge pain when dealing with file paths that contain non-ASCII characters, e.g. 'ƒ', and I'd like to get it right. It would be nice if tinyxml2 guaranteed that a utf-8-encoded file path would work on all platforms. (Or, alternatively, documented the correct encoding for file paths on each platform.)

Lingua principale
C++
Stelle
5.8k
Fork
2k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di leethomason/tinyxml2

Tutte le issue di leethomason/tinyxml2

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.