[ruby-core:70676] [Ruby trunk - Bug #11511] Problem with cyrillic letter И

From: xiro@...
Date: 2015-09-07 12:59:42 UTC
List: ruby-core #70676
Issue #11511 has been updated by xiro@inboxdesign.me xiro@inboxdesign.me.


converted file to utf-8
set up comment

# encoding: UTF-8

this does not help. 

please help how to solve a problem.

----------------------------------------
Bug #11511: Problem with cyrillic letter И
https://bugs.ruby-lang.org/issues/11511#change-54068

* Author: xiro@inboxdesign.me xiro@inboxdesign.me
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.0.0p643 (2015-02-25) [i386-mingw32]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
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.



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next