Project

General

Profile

Actions

Bug #8733

closed

miniruby always reports warnings when writing to console on Windows

Added by usa (Usaku NAKAMURA) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-08-05 trunk 42382) [x64-mswin64_100]
[ruby-dev:47584]

Description

=begin
しばらく前になかださんが組み込みエンコーディング周りをいじってからというもの、
以下のような警告が出るようになりました。

C:\ruby> miniruby -e "p ''"
-e:1: warning: failed to load encoding (UTF-16LE); use ASCII-8BIT instead
-e:1: warning: failed to load encoding (UTF-16LE); use ASCII-8BIT instead
""
ということはつまりrubyのビルド中に山ほどこの警告が出るわけで、いいかげん
つらいのでなんとかなりませんでしょうか。

なお、win32/win32.cのrb_w32_write_console()が出所です。
=end

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

クロスコンパイルとかck.exe上からとかしかビルドしてませんでした(ドヤ)。

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 10 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r42385.
Usaku, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


win32.c: conversion to WCHAR

  • win32/win32.c (rb_w32_write_console): use MultiByteToWideChar() for
    the last step of conversion to WCHAR, to get rid of warnings from
    rb_enc_find() in miniruby. [ruby-dev:47584] [Bug #8733]
Actions

Also available in: Atom PDF

Like0
Like0Like0