Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6397 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[XPATCH] Chars#tidy_bytes tidies too much bytes

Reported by: manfred Assigned to: nzkoz
Priority: normal Milestone: 1.x
Component: ActiveSupport Version: edge
Severity: normal Keywords: multibytebug
Cc:

Description

The tidy_bytes method currently cleans up the entire string instead of just the broken bytes. This patch changes this behaviour so only broken bytes get fixed.

Attachments

multibyte_tidy_bytes_fix.diff (2.5 kB) - added by manfred on 10/13/06 11:22:02.
multibyte_tidy_bytes_fix2.diff (2.4 kB) - added by manfred on 10/15/06 10:16:19.

Change History

10/13/06 11:22:02 changed by manfred

  • attachment multibyte_tidy_bytes_fix.diff added.

10/13/06 19:55:25 changed by nzkoz

  • owner changed from David to nzkoz.
  • status changed from new to assigned.

10/14/06 03:05:39 changed by nzkoz

  • summary changed from [PATCH] Chars#tidy_bytes tidies too much bytes to [XPATCH] Chars#tidy_bytes tidies too much bytes.

I get failures with this patch:

1) Failure:

test_tidy_bytes(UTF8HandlingTestPure) ./test/multibyte_handler_test.rb:242: <"�"> expected but was <"�">.

10/15/06 10:16:19 changed by manfred

  • attachment multibyte_tidy_bytes_fix2.diff added.

10/15/06 10:17:13 changed by manfred

Hmm, sorry for all the test failures. Here's a new patch.

10/17/06 08:29:17 changed by nzkoz

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [5316]) Ensure Chars#tidy_bytes only tidies broken bytes. Closes #6397 [Manfred Stienstra]