mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (rb_str_normalize_ospath):
HFS Plus (Mac OS Extended) uses a variant of Normal Form D in which U+2000 through U+2FFF, U+F900 through U+FAFF, and U+2F800 through U+2FAFF are not decomposed (this avoids problems with round trip conversions from old Mac text encodings). http://developer.apple.com/library/mac/qa/qa1173/_index.html Therefore fix r42457 to exclude the range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
06ed1c781a
commit
9962aad7b0
8 changed files with 183 additions and 4 deletions
18
ext/-test-/string/normalize.c
Normal file
18
ext/-test-/string/normalize.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "ruby.h"
|
||||
#include "internal.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
static VALUE
|
||||
normalize_ospath(VALUE str)
|
||||
{
|
||||
return rb_str_normalize_ospath(RSTRING_PTR(str), RSTRING_LEN(str));
|
||||
}
|
||||
#else
|
||||
#define normalize_ospath rb_f_notimplement
|
||||
#endif
|
||||
|
||||
void
|
||||
Init_normalize(VALUE klass)
|
||||
{
|
||||
rb_define_method(klass, "normalize_ospath", normalize_ospath, 0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue