Project

General

Profile

Actions

Bug #8592

closed

when outputing to console, it's encoding is ignored for Windows

Added by davispuh (Dāvis Mosāns) almost 11 years ago. Updated over 10 years ago.

Status:
Third Party's Issue
Assignee:
Target version:
-
ruby -v:
ruby 2.0.0p195 (2013-05-14) [x64-mingw32]
[ruby-core:55743]

Description

=begin
for example code

#!/usr/bin/env ruby
#encoding: utf-8
print "testing ā"

when open CMD with changed encoding ie. ((%chcp 1257%))

it wont correctly output ((ā)) even that encoding and console does support it.

also if we change console's encoding to utf-8 with ((%chcp 65001%))
both Ruby versions (1.9 and 2.0) will crash (see attachment)

=end


Files

ruby_crash.txt (3.99 KB) ruby_crash.txt davispuh (Dāvis Mosāns), 07/02/2013 05:06 AM

Updated by luislavena (Luis Lavena) almost 11 years ago

  • Status changed from Open to Feedback
  • Assignee set to windows

Hello,

I was not able to reproduce your problem.

Script:
https://gist.github.com/luislavena/c5a5697bd7079c182034

Result

http://cl.ly/image/440K232n0M0Q

Can you try the same script?

Updated by davispuh (Dāvis Mosāns) almost 11 years ago

=begin
yeah, same result

((URL:http://i.imm.io/1aPzV.png))

maybe it's something to do because I've localized version of Windows 8?
=end

Updated by davispuh (Dāvis Mosāns) almost 11 years ago

actually I just noticed I had default raster fonts set for console, if I change it to Lucida Console it doesn't crash. And shows characters correctly.

Updated by luislavena (Luis Lavena) almost 11 years ago

  • Status changed from Feedback to Third Party's Issue

Yeah, forgot to mention that raster fonts are a real problem on Windows.

Closing this now.

Updated by davispuh (Dāvis Mosāns) almost 11 years ago

yeah, I didn't noticed it at first. But it's still weird why it crashes and that font still does support those characters. Also in Windows those raster fonts are default when it's just fresh installed. User have to specially change them.

Updated by davispuh (Dāvis Mosāns) over 10 years ago

Is it some MinGW lib's fault for this?

It's still happening with ruby 1.9.3p448 and 2.0.0p247

seems very similar to #7758 maybe it's even same bug.
Those raster fonts acts really weird...

BTW, it does crash even if I launch ruby.exe directly from cmd.exe with full path.

Actions #7

Updated by davispuh (Dāvis Mosāns) over 10 years ago

Raster fonts are also default for PowerShell and it does crash there too.

Is it just for my Win8 installation or everyone that raster fonts are default unless you change them?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0