Project

General

Profile

Actions

Bug #9073

closed

Array#join encoding problem

Added by 046569 (6569 04) over 10 years ago. Updated over 10 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
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.

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Status changed from Open to Third Party's Issue

Bugs in gems return ASCII-8BIT strings.

Actions

Also available in: Atom PDF

Like0
Like0