Project

General

Profile

Actions

Bug #11511

closed

Problem with cyrillic letter И

Added by xiro@inboxdesign.me (xiro@inboxdesign.me xiro@inboxdesign.me) over 8 years ago. Updated over 4 years ago.

Status:
Closed
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
Actions #1

Updated by xiro@inboxdesign.me (xiro@inboxdesign.me xiro@inboxdesign.me) over 8 years ago

converted file to utf-8
set up comment

# encoding: UTF-8

this does not help.

please help how to solve a problem.

Actions #2

Updated by usa (Usaku NAKAMURA) over 8 years ago

How to reproduce?

I could not reproduce with irb.

Actions #3

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Open to Feedback
Actions #4

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0