Bug #9073

Array#join encoding problem

Added by 6569 04 6 months ago. Updated 6 months ago.

[ruby-core:58131]
Status:Third Party's Issue
Priority:Normal
Assignee:-
Category:-
Target version:-
ruby -v:ruby 2.1.0dev (2013-09-22 trunk 43011) [x86_64-darwin13.0.0] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Description

a=['hello']
a.push 'kitty'.force_encoding('ASCII-8BIT')
puts a.join
=> hellokitty

a=['问题']
a.push '错误'.force_encoding('ASCII-8BIT')
puts a.join
=> incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
=> 问题错误(I expect)
some gems return ASCII-8BIT so I had to encoding everyone.

History

#1 Updated by Nobuyoshi Nakada 6 months ago

  • Status changed from Open to Third Party's Issue

Bugs in gems return ASCII-8BIT strings.

Also available in: Atom PDF