Re: [MacRuby-devel] String#sub/gsub and text encodings

2011-05-20 Thread Vincent Isambart
Hi, > I finally found time to further investigate this. Thanks for investigating it. > Am I doing something wrong? If not, I'll file a ticket. No it's indeed a bug, could you please file a ticket. By the way I've made a shorter version of your code: --- framework 'Cocoa' s1 = NSMutableStrin

Re: [MacRuby-devel] String#sub/gsub and text encodings

2011-05-20 Thread Yasu Imao
Hi, I finally found time to further investigate this. It thought it was sub/gsub in general, but it was sub!/gsub! in a special case, which is reading a text file with NSMutableString#initWithContentsOfFile:encoding:error: I created a text file in UTF-8 and the content is this is a test scri

Re: [MacRuby-devel] String#sub/gsub and text encodings

2011-05-16 Thread Laurent Sansonetti
Hi Caio, On May 16, 2011, at 2:21 PM, Caio Chassot wrote: > On 2011-05-16, at 00:37 , Laurent Sansonetti wrote: > >> Filling dups is always a good idea as it helps up prioritizing work. > > Oh Laurent, please let's not encourage this terrible dupes-as-voting-system > practice; just add a +1 bu

Re: [MacRuby-devel] String#sub/gsub and text encodings

2011-05-16 Thread Caio Chassot
On 2011-05-16, at 00:37 , Laurent Sansonetti wrote: > Filling dups is always a good idea as it helps up prioritizing work. Oh Laurent, please let's not encourage this terrible dupes-as-voting-system practice; just add a +1 button to tickets. Filling proper tickets is hard work. Time shouldn't b

Re: [MacRuby-devel] String#sub/gsub and text encodings

2011-05-15 Thread Laurent Sansonetti
If the script works different in CRuby 1.9, then a ticket will be helpful too, as it is likely something we need to fix. I don't know by heart if it's a well-known issue, but we will figure it out later. Filling dups is always a good idea as it helps up prioritizing work. Thanks, Laurent On Ma

Re: [MacRuby-devel] String#sub/gsub and text encodings

2011-05-15 Thread Caio Chassot
Hi, Can you post some sample code? Thanks On Sun, May 15, 2011 at 11:50, Yasu Imao wrote: > Hi, > > I just wrote a simple script for text processing and encountered a problem > with String#sub/gsub. > > Original text: UTF-8 encoded ASCII character only text > Replacing text: UTF-8 encoded text

[MacRuby-devel] String#sub/gsub and text encodings

2011-05-15 Thread Yasu Imao
Hi, I just wrote a simple script for text processing and encountered a problem with String#sub/gsub. Original text: UTF-8 encoded ASCII character only text Replacing text: UTF-8 encoded text with ASCII and non-ASCII characters (including Japanese characters) The resulting text: all the non-ASC