Forum: Ruby questions about -K and /u

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Xavier N. (Guest)
on 2006-02-15 17:45
(Received via mailing list)
I don't understand what -K and /u mean.

The pickaxe says -K "specifies the code set to be used", but to be
used for what? Specifies the code set of the source code? It affects
to the internal representation of strings? It affects regexps?

Besides those questions, I played a bit around to try to figure this
out without luck:

I saved a simple Ruby test script in UTF-8. This test script has a
simple regexp with an accented character that filters external test
data in Latin-1 converted to UTF-8 with iconv. The matching succeeded
no matter whether I used -Ku or /u. In any of the four combinations
it succeeded. Why?

As you see I don't have the ideas ordered about this, if it is more
simple to explain the picture instead of answering that please feel

-- fxn
This topic is locked and can not be replied to.