Project

General

Profile

Actions

Bug #3432

closed

bad conversion from UTF8-MAC

Added by Eregon (Benoit Daloze) almost 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2010-06-09) [x86_64-darwin10.3.0]
Backport:
[ruby-core:30751]

Description

=begin
Ruby does not convert well from UTF8-MAC to UTF-8

The attached script shows it is the only encoding to behave that way and which is compatible 'é' or 'è' in UTF-8.

The results is:
UTF8-MAC Backward conversion: not the same bytes:
[169, 0, 116, 168, 0] != [195, 169, 116, 195, 168]
UTF8-MAC Backward conversion: not the same chars:
["\xA9", "\u0000", "t", "\xA8", "\u0000"] != ["é", "t", "è"]

This issue prevent, without Iconv, from converting properly UTF8-MAC String (from HFS paths) to UTF-8
=end


Files

encoding.rb (1.08 KB) encoding.rb Eregon (Benoit Daloze), 06/12/2010 07:54 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0