[#80974] [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit — ko1@...
Issue #13517 has been updated by ko1 (Koichi Sasada).
4 messages
2017/05/02
[#81024] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
— SASADA Koichi <ko1@...>
2017/05/07
sorry for late response.
[#80996] [Ruby trunk Feature#13544] Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE — sam.saffron@...
Issue #13544 has been reported by sam.saffron (Sam Saffron).
3 messages
2017/05/04
[#81016] [Ruby trunk Bug#13526] Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] — s.wanabe@...
Issue #13526 has been updated by wanabe (_ wanabe).
3 messages
2017/05/07
[#81048] Re: [ruby-cvs:65788] normal:r58614 (trunk): rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t — SASADA Koichi <ko1@...>
It causes compile error on raspi 3.
3 messages
2017/05/09
[#81201] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle — "U.NAKAMURA" <usa@...>
Hi, Eric
4 messages
2017/05/16
[#81202] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle
— Eric Wong <normalperson@...>
2017/05/16
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534) — SASADA Koichi <ko1@...>
Hi,
6 messages
2017/05/28
[#81428] Re: Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
— Eric Wong <normalperson@...>
2017/05/28
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:81060] [Ruby trunk Bug#13549] MinGW / Windows encoding - Two issues
From:
duerst@...
Date:
2017-05-09 08:58:40 UTC
List:
ruby-core #81060
Issue #13549 has been updated by duerst (Martin Dテシrst).
Please post separate issues separately. If they are related, please link them with "Related issues".
----------------------------------------
Bug #13549: MinGW / Windows encoding - Two issues
https://bugs.ruby-lang.org/issues/13549#change-64706
* Author: MSP-Greg (Greg L)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.5.0dev (2017-05-08 trunk 58610) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
## Issue #1
The documentation for [Encoding.default_internal=](https://msp-greg.github.io/ruby_trunk/Core/Encoding.html#default_external=-class_method) states:
"The locale encoding (\_\_ENCODING\_\_), not default_internal, is used as the encoding of created strings."
Below is code and the console output for a MinGW build. Whether a variable is assigned to a string, or a string directly, it appears that both are encoded UTF-8, regardless of the locale encoding.
So, something is amiss. Is it --
1. The documentation mistaken
2. The behavior is specific to *nix builds
3. The MinGW build is behaving incorrectly
```ruby
txt = 'ABCDEF_テ、テ姪シ'
puts "filesystem #{Encoding.find('filesystem')}" \
"\nlocale #{Encoding.find('locale')}" \
"\nexternal #{Encoding.default_external}" \
"\ninternal #{Encoding.default_internal}" \
"\ntxt #{txt.encoding.to_s}" \
"\n'ABCDEF_テ、テ姪シ' #{'ABCDEF_テ、テ姪シ'.encoding.to_s}"
```
#### Console out with default encoding
```
filesystem Windows-1252
locale IBM437
external IBM437
internal
txt UTF-8
'ABCDEF_テ、テ姪シ' UTF-8
```
#### Console out with locale set to 1252 with chcp
```
filesystem Windows-1252
locale Windows-1252
external Windows-1252
internal
txt UTF-8
'ABCDEF_テ、テ姪シ' UTF-8
```
## Issue #2
In the issue [Set Encoding.default_external to UTF-8 on Windows #13488](https://bugs.ruby-lang.org/issues/13488), Lars Kanis proposed changing Ruby default encodings on Windows to UTF-8. Discussion showed that, at present, this would an issue for many users.
In that thread, Nobu posted console output that showed `default_external` matching `filesystem`.
```
C:\Users\nobu\work\ruby\trunk\x64-mswin32_140>.\bin\ruby -e "p Encoding.default_external, Encoding.find('filesystem')"
#<Encoding:Windows-31J>
#<Encoding:Windows-31J>
```
In recent MinGW builds, I've had 8 failures and 1 error. This weekend I spent a little time patching around three failures, two of which involved encoding. The patches are dependent on the cause/fix for Issue #1, but also seem to work best when `locale` and `default_external` encodings are set equal to `filesystem`.
As noted above, my Windows system (standard American English Win7) has `filesystem` encoding of Windows-1252, with `locale` and `default_external` are IBM437. Why, I don't know.
Given that Nobu showed `filesystem` equal to `default_external`, would it be possible to change 'Windows' ruby so that, by default, `locale` and `default_external` are set equal to `filesystem`?
Not being a c type, I cannot create a patch/PR, etc. Lastly, moving this post between my code editor and 'Visual Studio Code' had some encoding issues. Or, yes, Windows does still have encoding issues...
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>