Project

General

Profile

Bug #11511

Problem with cyrillic letter И

Added by xiro@inboxdesign.me (xiro@inboxdesign.me xiro@inboxdesign.me) almost 4 years ago. Updated 12 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p643 (2015-02-25) [i386-mingw32]
[ruby-core:<unknown>]

Description

I have problem dealing with the И letter.

'И'.encoding #>ASCII-8BIT

'И'.force_encoding('ASCII-8BIT').encode('utf-8') #> UndefinedConversionError: "\xC8" from ASCII-8BIT to UTF-8

'И'.force_encoding('cp1251').encode('utf-8')[0].ord #> 1048
'И'.force_encoding('cp1251').encode('utf-8') #> "�?"

1048.chr #> "�?" (why so strange output?)

This issue is blocker for me.


Files

prompt.jpg (58.8 KB) prompt.jpg usa (Usaku NAKAMURA), 09/07/2015 01:28 PM

History

#1

Updated by xiro@inboxdesign.me (xiro@inboxdesign.me xiro@inboxdesign.me) almost 4 years ago

converted file to utf-8
set up comment

# encoding: UTF-8

this does not help.

please help how to solve a problem.

#2

Updated by usa (Usaku NAKAMURA) almost 4 years ago

How to reproduce?

I could not reproduce with irb.

#3

Updated by jeremyevans0 (Jeremy Evans) about 2 months ago

  • Status changed from Open to Feedback
#4

Updated by jeremyevans0 (Jeremy Evans) 12 days ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF