On Wed, May 11, 2011 at 12:05 AM, Bram Moolenaar <[email protected]> wrote:
>
> Shawn Y.H. Kim wrote:
>
>> In response to the following comment made by Bram on Aug 2, 2007:
>> (can be viewed at 
>> http://groups.google.com/group/vim_dev/browse_thread/thread/3b73a504c77ba803/)
>>
>> > I hesitate removing the Hangul support without knowing for sure that it
>> > is not needed.  Browsing through the messages I do see remarks that it
>> > might still be useful to a few people.
>> >
>> > Perhaps the Hangul support can be changed to also work for UTF-8?
>>
>> I made (finally) a patch that enables hangul-input module to work for
>> UTF-8.
>
> Thanks.  I'm glad to finally see this implemented.
> It still needs some work though.
>
>> Finally, hg diff:
>> ... It is too long. But I cannot find a way to attach a file, so, here
>> goes the diff:
>
> Please do send this as an attachment.  Long lines got wrapped, making it
> impossible to apply.

Yes. Next time, I will send it as an attachment using google mail :-)

> The change to getchar.c should not be there.  Perhaps you are not
> encoding the strings that go into the input buffer correctly?  A CSI
> should be put there as three characters: CSI KS_EXTRA KE_CSI.
> I guess fix_input_buffer() can be used in push_raw_key().

As I wrote in the comment, any unicode that falls into the range of
U+XX1B, U+X6CX, U+X6DX, U+X6EX, U+X6FX will have 0x9B (CSI)
if it is encoded using UTF-8 encoding scheme.
Question is, is it correct to input raw UTF-8 code into the input buffer?
If it is correct, then the logic that I commented out has some problem, I guess.
I will look into fix_input_buffer() function to check if it will do
the trick, thanks for
the advice :-)

> It should be possible to keep hangul_width[] inside hangulin.c.  Instead
> of:
>        (void)gui_outstr_nowrap(composing_hangul_buffer, 
> hangul_width[enc_utf8],
> Use something like:
>        (void)hangul_outstr_composing();
>
> The code for calling push_raw_key() can also be put in one place.

Good point. I will look for more graceful way to blend hangul input codes in.

> The call to my_iconv_open() must be inside a check for USE_ICONV.
> Perhaps when this is not available all of the patch won't work?
> Then you need to add a lot more #ifdefs.

You are right, iconv related routines should be surrounded by USE_ICONV check.
As you pointed out, if iconv is not available, the patch won't work, right.
I will work on it.

After I am done with all of the points you mentioned, I am going to send
another patch. Please wait for me until then. It will take some time, though.

Thanks for your comments, helped a lot.
Look forward to the next patch ;-)

>
>
> --
> hundred-and-one symptoms of being an internet addict:
> 82. AT&T names you Customer of the Month for the third consecutive time.
>
>  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org        ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
>



-- 
May the life be a ever lasting rapture.

Shawn Y.H. Kim
+82 16 7287 5874
orchistro at gmail dot com
http://orchistro.tistory.com

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui