ext/xml case folding broken for non-ASCII characters
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.1k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 96
Mô tả
Description
See ext/xml/tests/xml007.phpt
The code will never run in 8.2 or up because of changes to how strtoupper works. This means the test will be skipped due to the SKIPIF settings which has a locale-dependent strtoupper check.
Removing the SKIPIF shows that the test is indeed broken, even on systems where it worked on 8.1 it won't work on 8.2.
Other than that, this never worked properly because it depends on the locale.
From https://www.w3.org/TR/WD-xml-970807.xml
case-folding: a process applied to a sequence of characters, in which those identified as non-uppercase (in scripts which have case distinctions) are replaced by their uppercase equivalents, as specified in The Unicode Standard, Version 2.0, section 4.1. Note that Unicode recommends folding to lowercase; for compatibility reasons, XML processors must fold to uppercase. Case-folding, as described here, neither requires nor forbids the normalization of Unicode character sequences into canonical form (e.g. as described in The Unicode Standard, section 5.9).
So it's not supposed to depend on the locale.
PHP Version
8.1 / 8.2 depending on your point of view
Operating System
No response
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với ext/xml/tests/xml007.phpt, bao gồm SKIPIF phụ thuộc vào locale của nó, và tái hiện lỗi trên PHP 8.2 hoặc mới hơn. Theo dõi hành vi chuyển đổi chữ hoa/chữ thường của ext/xml liên quan đến strtoupper và xác minh rằng bài kiểm thử được chạy và tạo ra cách xử lý chữ hoa không phụ thuộc vào locale cho các ký tự không phải ASCII.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- c, php
- Lĩnh vực
- internationalization
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100