questions about -K and /u

X

Xavier Noria

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
free.

-- fxn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,813
Messages
2,569,696
Members
45,480
Latest member
CrazyMember

Latest Threads

Top