This project is archived and is in readonly mode.
ActionPack, 1.9.2-head 3 failing tests regarding encodings
-
Rohit Arondekar
The 3rd failure seems like a mistake in the return value of t. I've attached a patch to fix this (if it's indeed the problem).
-
Rohit Arondekar
Bad formatting in the original message.
This is regarding the first 2 tests, asserts without force_encoding:
The string literals have encoding of ASCII-8BIT
"...\203ciency could not be...".encoding => ASCII-8BITWhereas, excerpt returns a UTF-8 string, and hence the tests fail.
excerpt("That's why e\357\254\203ciency could not be helped", 'could', 8).encoding => UTF-8 -
Santiago Pastorino
- Milestone cleared.
- State changed from new to open
That's not the proper fix Rohit.
This test is fixed here. -
Rohit Arondekar
Santiago, thanks for the proper fix. I've never used translation so I didn't know what t() is supposed to return. Any idea how to fix the first 2 failures?
-
Rohit Arondekar
+1 on the patch, the translation test now passes on 1.8.7 and 1.9.2-head.
-
Repository
(from [e5a56eb297f41dae12e03cf03bad4a25068bba09]) fix translation test in actionpack [#4701 ActionPack, 1.9.2-head 3 failing tests regarding encodings state:commited]
Signed-off-by: wycats wycats@gmail.com
http://github.com/rails/rails/commit/e5a56eb297f41dae12e03cf03bad4a... -
Rohit Arondekar
I think it would be a good idea to mark this ticket resolved as the tests now pass after commit => http://github.com/rails/rails/commit/d7f6f2b596d00a7deb4f83592aaa78...
But from the comment in the commit, ".mb_chars always returns UTF-8, even in 1.9. This is not great, but it's how it works. Let's work this out." (http://bit.ly/aUsn1o), a new dedicated ticket can be opened?
-
Santiago Pastorino
- State changed from open to committed
[#OMG state:committed] with one t. So i'm closing by hand
