Bug #8733

miniruby always reports warnings when writing to console on Windows

Added by Usaku NAKAMURA 9 months ago. Updated 9 months ago.

[ruby-dev:47584]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:-
Target version:-
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のrbw32write_console()が出所です。
=end

Associated revisions

Revision 42385
Added by Nobuyoshi Nakada 9 months ago

win32.c: conversion to WCHAR

  • win32/win32.c (rbw32writeconsole): use MultiByteToWideChar() for the last step of conversion to WCHAR, to get rid of warnings from rbenc_find() in miniruby. [Bug #8733]

History

#1 Updated by Nobuyoshi Nakada 9 months ago

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

#2 Updated by Nobuyoshi Nakada 9 months 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 (rbw32writeconsole): use MultiByteToWideChar() for the last step of conversion to WCHAR, to get rid of warnings from rbenc_find() in miniruby. [Bug #8733]

Also available in: Atom PDF