Commit | Line | Data |
642fd4ec |
1 | If you read this file _as_is_, just ignore the funny characters you |
2 | see. It is written in the POD format (see perlpod manpage) which is |
3 | specially designed to be readable as is. |
4 | |
5 | This file is in Korean encoded in EUC-KR. |
6 | |
7 | ÀÌ ¹®¼¸¦ perldocÀ» ½á¼ º¸Áö ¾Ê°í Á÷Á¢ º¸´Â °æ¿ì¿¡´Â °¢ ºÎºÐÀÇ |
8 | ¿ªÇÒÀ» Ç¥½ÃÇϱâ À§ÇØ ¾²ÀÎ =head, =item, 'L' µîÀº ¹«½ÃÇϽʽÿÀ. |
9 | ÀÌ ¹®¼´Â µû·Î perldocÀ» ¾²Áö ¾Ê°í º¸´õ¶óµµ Àдµ¥ º° ÁöÀåÀÌ |
10 | ¾ø´Â POD Çü½ÄÀ¸·Î Â¥¿© ÀÖ½À´Ï´Ù. ´õ ÀÚ¼¼ÇÑ °ÍÀº perlpod |
11 | ¸Å´º¾óÀ» Âü°íÇϽʽÿÀ. |
12 | |
13 | |
14 | =head1 NAME |
15 | |
16 | perlko - Perl°ú Çѱ¹¾î ÀÎÄÚµù |
17 | |
18 | =head1 DESCRIPTION |
19 | |
20 | PerlÀÇ ¼¼°è¿¡ ¿À½Å °ÍÀ» ȯ¿µÇÕ´Ï´Ù ! |
21 | |
22 | |
23 | PerlÀº 5.8.0ÆǺÎÅÍ À¯´ÏÄÚµå/ISO 10646¿¡ ´ëÇÑ ±¤¹üÀ§ÇÑ Áö¿øÀ» ÇÕ´Ï´Ù. |
24 | À¯´ÏÄÚµå Áö¿øÀÇ ÀÏȯÀ¸·Î ÇÑÁßÀÏÀ» ºñ·ÔÇÑ ¼¼°è °¢±¹¿¡¼ |
25 | À¯´ÏÄÚµå ÀÌÀü¿¡ ¾²°í ÀÖ¾ú°í Áö±Ýµµ ³Î¸® ¾²ÀÌ°í ÀÖ´Â ¼ö¸¹Àº ÀÎÄÚµùÀ» |
26 | Áö¿øÇÕ´Ï´Ù. À¯´ÏÄÚµå´Â Àü ¼¼°è¿¡¼ ¾²ÀÌ´Â ¸ðµç ¾ð¾î¸¦ À§ÇÑ Ç¥±â ü°è - |
27 | À¯·´ÀÇ ¶óƾ ¾ËÆĺª, Å°¸± ¾ËÆĺª, ±×¸®½º ¾ËÆĺª, Àεµ¿Í µ¿³² ¾Æ½Ã¾ÆÀÇ |
28 | ºê¶ó¹Ì °è¿ ½ºÅ©¸³Æ®, ¾Æ¶ø ¹®ÀÚ, È÷ºê¸® ¹®ÀÚ, ÇÑÁßÀÏÀÇ ÇÑÀÚ, Çѱ¹¾îÀÇ ÇѱÛ, |
97cef9f7 |
29 | ÀϺ»¾îÀÇ °¡³ª, ºÏ¹Ì Àεð¾ÈÀÇ Ç¥±â ü°è µî-¸¦ ¼ö¿ëÇÏ´Â °ÍÀ» ¸ñÇ¥·Î ÇÏ°í |
642fd4ec |
30 | Àֱ⠶§¹®¿¡ ±âÁ¸¿¡ ¾²ÀÌ´ø °¢ ¾ð¾î ¹× ±¹°¡ ±×¸®°í ¿î¿µ ü°è¿¡ °íÀ¯ÇÑ |
97cef9f7 |
31 | ¹®ÀÚ ÁýÇÕ°ú ÀÎÄÚµù¿¡ ¾µ ¼ö ÀÖ´Â ¸ðµç ±ÛÀÚ´Â ¹°·ÐÀÌ°í ±âÁ¸ ¹®ÀÚ ÁýÇÕ¿¡¼ |
32 | Áö¿øÇÏ°í ÀÖÁö ¾Ê´ø ¾ÆÁÖ ¸¹Àº ±ÛÀÚ¸¦ Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù. |
642fd4ec |
33 | |
34 | |
35 | PerlÀº ³»ºÎÀûÀ¸·Î À¯´ÏÄڵ带 ¹®ÀÚ Ç¥ÇöÀ» À§ÇØ »ç¿ëÇÕ´Ï´Ù. º¸´Ù ±¸Ã¼ÀûÀ¸·Î |
36 | ¸»Çϸé Perl ½ºÅ©¸³Æ® ¾È¿¡¼ UTF-8 ¹®ÀÚ¿À» ¾µ ¼ö ÀÖ°í, |
37 | °¢Á¾ ÇÔ¼ö¿Í ¿¬»êÀÚ(¿¹¸¦ µé¾î, Á¤±Ô½Ä, index, substr)°¡ ¹ÙÀÌÆ® ´ÜÀ§ |
38 | ´ë½Å À¯´ÏÄÚµå ±ÛÀÚ ´ÜÀ§·Î µ¿ÀÛÇÕ´Ï´Ù. (´õ ÀÚ¼¼ÇÑ °ÍÀº |
39 | perlunicode ¸Å´º¾óÀ» Âü°íÇϽʽÿÀ.) À¯´ÏÄڵ尡 ³Î¸® º¸±ÞµÇ±â Àü¿¡ |
40 | ³Î¸® ¾²ÀÌ°í ÀÖ¾ú°í, ¿©ÀüÈ÷ ³Î¸® ¾²ÀÌ°í ÀÖ´Â °¢±¹/°¢ ¾ð¾îº° ÀÎÄÚµùÀ¸·Î |
41 | ÀÔÃâ·ÂÀ» ÇÏ°í À̵é ÀÎÄÚµùÀ¸·Î µÈ µ¥ÀÌÅÍ¿Í ¹®¼¸¦ ´Ù·ç´Â °ÍÀ» µ½±â À§ÇØ |
42 | 'Encode'°¡ ¾²¿´½À´Ï´Ù. ¹«¾ùº¸´Ù 'Encode'¸¦ ½á¼ ¼ö¸¹Àº ÀÎÄÚµù »çÀÌÀÇ |
43 | º¯È¯À» ½±°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù. |
44 | |
45 | 'Encode'´Â ´ÙÀ½°ú °°Àº Çѱ¹¾î ÀÎÄÚµùÀ» Áö¿øÇÕ´Ï´Ù. |
46 | |
97cef9f7 |
47 | =over 4 |
48 | |
49 | =item euc-kr |
50 | |
51 | US-ASCII¿Í KS X 1001À» °°ÀÌ ¾²´Â ¸ÖƼ¹ÙÀÌÆ® ÀÎÄÚµù (ÈçÈ÷ ¿Ï¼ºÇüÀ̶ó°í |
52 | ºÒ¸².) KS X 2901°ú RFC 1557 Âü°í. |
53 | |
54 | =item cp949 |
55 | |
56 | MS-Windows 9x/ME¿¡¼ ¾²ÀÌ´Â È®Àå ¿Ï¼ºÇü. euc-kr¿¡ 8,822ÀÚÀÇ |
57 | ÇÑ±Û À½ÀýÀ» ´õÇÑ °ÍÀÓ. alias´Â uhc, windows-949, x-windows-949, |
58 | ks_c_5601-1987. ¸Ç ¸¶Áö¸· À̸§Àº ÀûÀýÇÏÁö ¾ÊÀº À̸§ÀÌÁö¸¸, Microsoft |
59 | Á¦Ç°¿¡¼ CP949ÀÇ Àǹ̷Π¾²ÀÌ°í ÀÖÀ½. |
60 | |
61 | =item johab |
62 | |
63 | KS X 1001:1998 ºÎ·Ï 3¿¡¼ ±ÔÁ¤ÇÑ Á¶ÇÕÇü. ¹®ÀÚ ·¹ÆÛÅ丮´Â cp949¿Í |
64 | ¸¶Âù°¡Áö·Î US-ASCII¿Í KS X 1001¿¡ 8,822ÀÚÀÇ ÇÑ±Û À½ÀýÀ» ´õÇÑ °ÍÀÓ. |
65 | ÀÎÄÚµù ¹æ½ÄÀº ÀüÇô ´Ù¸§. |
66 | |
67 | =item iso-2022-kr |
68 | |
69 | RFC 1557¿¡¼ ±ÔÁ¤ÇÑ Çѱ¹¾î ÀÎÅÍ³Ý ¸ÞÀÏ ±³È¯¿ë ÀÎÄÚµùÀ¸·Î US-ASCII¿Í |
70 | KS X 1001À» ·¹ÆÛÅ丮·Î ÇÏ´Â Á¡¿¡¼ euc-kr°ú °°Áö¸¸ ÀÎÄÚµù ¹æ½ÄÀÌ ´Ù¸§. |
71 | 1997-8³â °æ±îÁö ¾²¿´À¸³ª ´õ ÀÌ»ó ¸ÞÀÏ ±³È¯¿¡ ¾²ÀÌÁö ¾ÊÀ½. |
72 | |
73 | =item ksc5601-raw |
74 | |
75 | KS X 1001(KS C 5601)À» GL(Áï, MSB¸¦ 0À¸·Î ÇÑ °æ¿ì) ¿¡ ³õ¾ÒÀ» ¶§ÀÇ |
76 | ÀÎÄÚµù. US-ASCII¿Í °áÇÕÇÏÁö ¾Ê°í ´Üµ¶À¸·Î ¾²ÀÌ´Â ÀÏÀº X11 µî¿¡¼ ±Û²Ã |
77 | ÀÎÄÚµù (ksc5601.1987-0. '0'Àº GLÀ» ÀǹÌÇÔ.)À¸·Î ¾²ÀÌ´Â °ÍÀ» Á¦¿ÜÇÏ°í´Â |
78 | °ÅÀÇ ¾øÀ½. KS C 5601Àº 1997³â KS X 1001·Î À̸§À» ¹Ù²Ù¾úÀ½. 1998³â¿¡´Â µÎ |
79 | ±ÛÀÚ (À¯·ÎÈ ºÎÈ£¿Í µî·Ï »óÇ¥ ºÎÈ£)°¡ ´õÇØÁ³À½. |
80 | |
81 | =back |
82 | |
83 | ¸î °¡Áö »ç¿ë ¿¹Á¦¸¦ ¾Æ·¡¿¡ º¸ÀÔ´Ï´Ù. |
642fd4ec |
84 | |
85 | ¿¹¸¦ µé¾î, euc-kr ÀÎÄÚµùÀ¸·Î µÈ ÆÄÀÏÀ» UTF-8·Î º¯È¯ÇÏ·Á¸é ´ÙÀ½°ú |
86 | °°ÀÌ ÇÏ¸é µË´Ï´Ù. |
87 | |
88 | |
89 | perl -Mencoding=euc-kr,STDOUT,utf8 -pe1 < file.euckr > file.utf8 |
90 | |
91 | ¿ªº¯È¯Àº ´ÙÀ½°ú °°ÀÌ ÇÒ ¼ö ÀÖ½À´Ï´Ù. |
92 | |
93 | perl -Mencoding=utf8,STDOUT,euc-kr -pe1 < file.utf8 > file.euckr |
94 | |
97cef9f7 |
95 | ÀÌ·± º¯È¯À» Á»´õ Æí¸®ÇÏ°Ô ÇÒ ¼ö ÀÖµµ·Ï Encode ¸ðµâÀ» ½á¼ |
642fd4ec |
96 | ¼ø¼öÇÏ°Ô Perl·Î¸¸ ¾²ÀÎ piconv°¡ Perl¿¡ µé¾î ÀÖ½À´Ï´Ù. |
97 | ±× À̸§¿¡¼ ¾Ë ¼ö ÀÖµíÀÌ piconv´Â Unix¿¡ ÀÖ´Â iconv¸¦ |
98 | ¸ðµ¨·Î ÇÑ °ÍÀÔ´Ï´Ù. ±× »ç¿ë¹ýÀº ¾Æ·¡¿Í °°½À´Ï´Ù. |
99 | |
100 | piconv -f euc-kr -t utf8 < file.euckr > file.utf8 |
101 | piconv -f utf8 -t euc-kr < file.utf8 > file.euckr |
102 | |
97cef9f7 |
103 | ¶Ç, 'PerlIO::encoding' ¸ðµâÀ» ½á¼ Çѱ¹¾î ÀÎÄÚµùÀ» ¾²¸é¼ ±ÛÀÚ ´ÜÀ§ |
642fd4ec |
104 | (¹ÙÀÌÆ® ´ÜÀ§°¡ ¾Æ´Ï¶ó) 󸮸¦ ½±°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù. |
105 | |
97cef9f7 |
106 | #!/path/to/perl |
642fd4ec |
107 | |
108 | use encoding 'euc-kr', STDIN => 'euc-kr', |
109 | STDOUT-> 'euc-kr', STDERR=>'euc-kr'; |
110 | |
111 | print length("°¡³ª"); # 2 (Å« µû¿ÈÇ¥´Â ±ÛÀÚ ´ÜÀ§ 󸮸¦ Áö½Ã) |
112 | print length('°¡³ª'); # 4 (ÀÛÀº µû¿ÈÇ¥´Â ¹ÙÀÌÆ® ´ÜÀ§ 󸮸¦ Áö½Ã) |
113 | print index("ÇÑ°, ´ëµ¿°", "¿°"); # -1 ('¿°'ÀÌ ¾øÀ½) |
114 | print index('ÇÑ°, ´ëµ¿°', '¿°'); # 7 (8¹ø°¿Í 9¹ø° ¹ÙÀÌÆ®°¡ '¿°'ÀÇ |
115 | Äڵ尪°ú ÀÏÄ¡ÇÔ.) |
116 | |
117 | |
118 | =head2 ´õ ÀÚ¼¼È÷ ¾Ë°í ½ÍÀ¸¸é... |
119 | |
97cef9f7 |
120 | PerlÀ» ¼³Ä¡ÇÏ¸é ´ë´ÜÈ÷ ÀÚ¼¼ÇÑ ¹®¼°¡ °°ÀÌ µû¶ó ¿À¸ç, ÀÌ ¹®¼¸¦ ÅëÇØ |
642fd4ec |
121 | Perl Àü¹Ý »Ó ¾Æ´Ï¶ó À¯´ÏÄÚµå Áö¿ø, EncodeÀÇ »ç¿ë¹ý µî¿¡ ¸¹Àº °ÍÀ» |
97cef9f7 |
122 | ¹è¿ï ¼ö ÀÖ½À´Ï´Ù. ¾ÆÁ÷ ÀÌ ¹®¼´Â ÇöÀç ¸ðµÎ ¿µ¾î·Î ¾²¿© ÀÖ½À´Ï´Ù. |
642fd4ec |
123 | |
124 | |
125 | =head2 Perl °ü·Ã ÀÚ·á |
126 | |
97cef9f7 |
127 | À§¿¡¼ ¾ð±ÞÇÑ ¹®¼ ¿Ü¿¡µµ ´ÙÀ½°ú °°Àº ÀÚ·á°¡ ÀÖ½À´Ï´Ù. ÀÌ ¸ñ·ÏÀº °áÄÚ |
128 | ¿ÏÀüÇÑ °ÍÀÌ ¾Æ´Ï°í ÀϺΠ´ëÇ¥ÀûÀÎ °Í¸¸ ¸ðÀº °ÍÀÔ´Ï´Ù. |
129 | |
642fd4ec |
130 | =over 4 |
131 | |
132 | =item L<http://www.perl.com/> |
133 | |
134 | O'ReillyÀÇ Perl À¥ ÆäÀÌÁö |
135 | |
136 | =item L<http://www.cpan.org/> |
137 | |
138 | Comprehensive Perl Archive Network |
139 | |
140 | =item L<http://lists.perl.org/> |
141 | |
142 | Perl ¸ÞÀϸµ ¸®½ºÆ®. ¸¹Àº ¸®½ºÆ® °¡¿îµ¥ |
143 | perl-unicode¿¡¼ 'Encode'¿¡ ´ëÇØ ³íÀÇÇÔ. |
144 | |
145 | =back |
146 | |
147 | =head2 PerlÀ» ´õ ±í°Ô °øºÎÇϴµ¥ µµ¿òÀ» ÁÙ ¼ö ÀÖ´Â Çѱ¹¾î °ü·Ã »çÀÌÆ® |
148 | |
149 | =over 4 |
150 | |
151 | =item L<http://www.perl.or.kr/> |
152 | |
153 | Perl Çѱ¹ »ç¿ëÀÚ ¸ðÀÓ |
154 | |
155 | =item L<news:han.comp.lang.perl/> |
156 | |
157 | Çѱ¹¾î Perl ´º½º ±×·ì |
158 | |
159 | =item L<http://seoul.pm.org/> |
160 | |
161 | Perl ¸Á°Å½º (¼¿ï) |
162 | |
163 | =item L<http://www.perlmania.or.kr/> |
164 | |
165 | Home for Korean Perlmanias |
166 | |
167 | =item L<http://www.oreilly.co.kr/perl/> |
818c4caa |
168 | |
642fd4ec |
169 | O'Reilly¿¡¼ ³ª¿Â Çѱ¹¾î Perl ¼Àû ¸ñ·Ï |
170 | |
171 | =item L<http://www.perlschool.net/> |
172 | |
173 | Perl ±âÃÊ °Á ¹× ¼Ò½º, ÃÖ±Ù µ¿Çâ, °ü·Ã ÇØ¿Ü »çÀÌÆ® ¸µÅ© |
174 | |
175 | =item L<http://www.perl.co.kr> |
176 | |
177 | Perl¿¡ °ü·ÃµÈ CGI, DB, ¿¬µ¿ µî¿¡ ´ëÇÑ Á¤º¸ ¹× ´º½º Á¦°ø |
178 | |
179 | =back |
180 | |
97cef9f7 |
181 | =head2 À¯´ÏÄÚµå ¹× Çѱ¹¾î ÀÎÄÚµù °ü·Ã ÀÚ·á |
642fd4ec |
182 | |
183 | =over 4 |
184 | |
185 | =item L<http://www.unicode.org/> |
186 | |
187 | À¯´ÏÄÚµå ÄÁ¼Ò½Ã¾ö. |
188 | |
189 | =item L<http://std.dkuug.dk/JTC1/SC2/WG2> |
190 | |
191 | ±âº»ÀûÀ¸·Î Unicode¿Í °°Àº ISO Ç¥ÁØÀÎ ISO/IEC 10646 UCS(Universal |
192 | Character Set)À» ¸¸µå´Â ISO/IEC JTC1/SC2/WG2ÀÇ À¥ ÆäÀÌÁö. |
193 | |
97cef9f7 |
194 | =item L<http://jshin.net/faq/qa8.html> |
195 | |
196 | Çѱ¹¾î ¹®ÀÚ ÁýÇÕ ¹× ÀÎÄÚµù¿¡ ´ëÇÑ ¾È³». |
197 | |
818c4caa |
198 | =item L<http://www.cl.cam.ac.uk/~mgk25/unicode.html> |
642fd4ec |
199 | |
200 | À¯´Ð½º/¸®´ª½º¿¡¼ À¯´ÏÄÚµå¿Í UTF-8 »ç¿ë¿¡ ´ëÇÑ ¹®´äÁý(FAQ) |
201 | |
202 | =item L<http://kldp.org/Translations/html/UTF8-Unicode-KLDP/UTF8-Unicode-KLDP.html> |
203 | |
204 | À¯´Ð½º/¸®´ª½º¿¡¼ À¯´ÏÄÚµå¿Í UTF-8 »ç¿ë¿¡ ´ëÇÑ ¹®´äÁý(FAQ)ÀÇ Çѱ¹¾î ¹ø¿ª |
205 | |
206 | =back |
207 | |
97cef9f7 |
208 | =head1 SEE ALSO |
209 | |
210 | L<Encode>, L<Encode::KR>, L<encoding>, L<perluniintro>, L<perlunicode> |
211 | |
212 | |
642fd4ec |
213 | =head1 AUTHORS |
214 | |
215 | Jarkko Hietaniemi E<lt>jhi@iki.fiE<gt> |
97cef9f7 |
216 | ½ÅÁ¤½Ä E<lt>jshin@mailaps.orgE<gt> |
642fd4ec |
217 | |
218 | =cut |