Bug #8733

miniruby always reports warnings when writing to console on Windows

Added by Usaku NAKAMURA almost 2 years ago. Updated almost 2 years ago.

[ruby-dev:47584]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
ruby -v:ruby 2.1.0dev (2013-08-05 trunk 42382) [x64-mswin64_100] Backport:1.9.3: DONTNEED, 2.0.0: DONTNEED

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

Associated revisions

Revision 42385
Added by Nobuyoshi Nakada almost 2 years ago

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. [Bug #8733]

Revision 42385
Added by Nobuyoshi Nakada almost 2 years ago

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. [Bug #8733]

History

#1 Updated by Nobuyoshi Nakada almost 2 years ago

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

#2 Updated by Nobuyoshi Nakada almost 2 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. [Bug #8733]

Also available in: Atom PDF