Make WordPress Core

Opened 18 years ago

Closed 16 years ago

#6690 closed defect (bug) (duplicate)

utf8_uri_encode test data includes BOM caused test failure

Reported by: akky Owned by: westi
Priority: normal Milestone:
Component: WordPress.org Site Version: 2.5
Severity: minor Keywords:
Cc: Focuses:

Description

In WordPress unit test,

wordpress-tests/wp-testdata/jacob/utf-8.txt

has UTF-8 BOM at the beginning of the file so that testcase

wordpress-tests/wp-testcase/jacob/TestFormatting.php
Test_UTF8_URI_Encode::test_percent_encodes_non_reserved_characters()

fails. Because BOM code (0xef, 0xbb, 0xbf. for UTF-8) is tried to be url encoded.

BOM should not be included in this kind of test data.

You may take out the first 3 bytes from the test file, or UTF-8 compliant editor usually has an option letting you choose whether you use BOM or not for UTF text. I think turn off the option (no BOM) is better in most case.

I confirmed after taking BOM the test case worked fine.

Change History (6)

#1 @ryan
18 years ago

  • Milestone 2.5.22.9

Milestone 2.5.2 deleted

#2 @Denis-de-Bernardy
17 years ago

  • Keywords dev-feedback added; UTF-8 BOM testcase removed

see also: #6795.

#3 @Denis-de-Bernardy
17 years ago

  • Component GeneralWarnings/Notices
  • Owner anonymous removed

#4 @Denis-de-Bernardy
17 years ago

  • Component Warnings/NoticesWordPress.org
  • Keywords dev-feedback removed
  • Milestone 2.9Unassigned
  • Owner set to westi
  • Status newassigned

#5 @Denis-de-Bernardy
17 years ago

  • Milestone Unassigned

#6 @nacin
16 years ago

  • Resolutionduplicate
  • Status assignedclosed
Note: See TracTickets for help on using tickets.