Re: minor thing in spellfile conversion (7.0g)

2006-05-03 Thread Bram Moolenaar

Kyle Wheeler wrote:

> Using vim 7.0g, when I try to run :mkspell on a spell file of mine 
> (containing utf-8 characters), I get this:
> 
> Reading word file spellfile.utf-8.add ...
> Conversion in spellfile.utf-8.add not supported: from tf-8 to utf-8
> Compressing word tree...
> Compressed 777 of 1971 nodes; 1194 (60%) remaining
> Compressed 30 of 108 nodes; 78 (72%) remaining
> Writing spell file spellfile.utf-8.add.spl ...
> Done!
> Estimated runtime memory use: 6360 bytes
> 
> The command succeeds, and as far as I can tell the spellfile is 
> correct, but the error at the top about converting from tf-8 to utf-8 
> is worrisome. If it helps, the first line of my spellfile is 
> “/encoding=utf-8”. Anyone know if maybe I’m doing something wrong?

This is a bug.  When skipping over "/encoding=" it skips one character
too much.  I'll fix it.

Oh, your next message has the patch already.  Thanks!

-- 
hundred-and-one symptoms of being an internet addict:
5. You find yourself brainstorming for new subjects to search.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: minor thing in spellfile conversion (7.0g)

2006-05-03 Thread Kyle Wheeler

On Wednesday, May  3 at 12:57 PM, quoth Kyle Wheeler:

Conversion in spellfile.utf-8.add not supported: from tf-8 to utf-8


The command succeeds, and as far as I can tell the spellfile is 
correct, but the error at the top about converting from tf-8 to 
utf-8 is worrisome. If it helps, the first line of my spellfile is 
“/encoding=utf-8”. Anyone know if maybe I’m doing something wrong?


I think the problem is solved with the attached patch. It’s a simple 
counting problem from the ++line that happens in line 7054.


~Kyle
--
Men, as an organization, are getting more women than any other group 
working anywhere in the world. Wherever women are, we have men looking 
into it.

-- Jerry Seinfeld
--- spell.c.old 2006-05-03 13:11:48.0 -0400
+++ spell.c 2006-05-03 13:11:53.0 -0400
@@ -7066,7 +7066,7 @@
char_u  *enc;
 
/* Setup for conversion to 'encoding'. */
-   line += 10;
+   line += 9;
enc = enc_canonize(line);
if (enc != NULL && !spin->si_ascii
&& convert_setup(&spin->si_conv, enc,


pgpKsgrBilTwh.pgp
Description: PGP signature