Project

General

Profile

Bug #9073

Array#join encoding problem

Added by 6569 04 almost 3 years ago. Updated almost 3 years ago.

Status:
Third Party's Issue
Priority:
Normal
Assignee:
-
ruby -v:
ruby 2.1.0dev (2013-09-22 trunk 43011) [x86_64-darwin13.0.0]
[ruby-core:58131]

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 [ruby-core:58136] Updated by Nobuyoshi Nakada almost 3 years ago

  • Status changed from Open to Third Party's Issue

Bugs in gems return ASCII-8BIT strings.

Also available in: Atom PDF