ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: Joseph Jones <joeyi5216@gmail.com>
To: Ruby developers <ruby-core@ruby-lang.org>
Cc: <ruby-core@ruby-lang.org>
Subject: [ruby-core:72338]  [Ruby trunk - Bug #10097] Case-insensitive Regexp matching for Windows-1252 not working for ŠšŽžŒœÿŸ
Date: Thu, 17 Dec 2015 21:13:16 -0700	[thread overview]
Message-ID: <475C5A37-27C6-46BA-BE6F-340E97B4DFC1@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

Joseph Jones liked your message with Boxer. On December 11, 2015 at 01:04:08 MST, duerst@it.aoyama.ac.jp wrote:Issue #10097 has been updated by Martin Dürst.Nobuyoshi Nakada wrote:> Is this correct?> https://github.com/nobu/ruby/compare/windows-1252Sorry for the very slow response. Please commit. Thanks!----------------------------------------Bug #10097: Case-insensitive Regexp matching for Windows-1252 not working for ŠšŽžŒœÿŸhttps://bugs.ruby-lang.org/issues/10097#change-55458* Author: Martin Dürst* Status: Open* Priority: Normal* Assignee: * ruby -v: 1.9.3p545* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN----------------------------------------By chance I had a look at enc/iso_8859_1.c and found~~~CENC_REPLICATE("Windows-1252", "ISO-8859-1")~~~on line 288. But this does not work for case folding:~~~ruby# http://en.wikipedia.org/wiki/Windows-1252s1 = "\u0160".encode 'windows-1252' # 'Š'r1 = Regexp.new("\u0161".encode('windows-1252'), Regexp::IGNORECASE) # /š/is1 =~ r1 # => nils2 = "\u0178".encode 'windows-1252' # 'Ÿ'r2 = Regexp.new("\u00FF".encode('windows-1252'), Regexp::IGNORECASE) # /ÿ/is2 =~ r2 # => nils3 = "\u00C0".encode 'windows-1252' # 'À'r3 = Regexp.new("\u00E0".encode('windows-1252'), Regexp::IGNORECASE) # /à/is3 =~ r3 # => 0~~~So case-insensitive matching works when both characters are in iso-8859-1, but not when one (ÿŸ) or both (ŠšŽžŒœ) characters are not in iso-8859-1.-- https://bugs.ruby-lang.org/     

[-- Attachment #2: Type: text/html, Size: 1997 bytes --]

                 reply	other threads:[~2015-12-18  3:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=475C5A37-27C6-46BA-BE6F-340E97B4DFC1@gmail.com \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).