Windows and Utf-8

Đang mở
#885 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
20/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
backend

Hướng nghiên cứu

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 'ƒ'.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.)

Ngôn ngữ chính
C++
Star
5.8k
Fork
2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của leethomason/tinyxml2

Tất cả issue của leethomason/tinyxml2

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.