On 22 Mar 2004 at 6:27, Tony Mechelynck wrote:
> Thanks for drawing my attention to the 'printfont' option (which
> works on my system and is set to "Courier_New:h10"). But I don't
> think that, without a functional 'printencoding', it will help me
> print a file in UTF-8 with mixed Latin, Cyrillic and Arabic
> characters on a printer which, AFAIK, understands only graphics or
> cp1252 text (e.g. the file
> http://users.skynet.be/antoine.mechelynck/index.htm ).
It is still a vim todo to be able to print multiple character sets in
one file. While Unicode has come up with a single encoding, the
issue of printing very large character reportoires is a much harder
issue usually achieved by switching fonts with different encodings.
> Actually, I got the wrong end of the stick too. To avoid hollow
> boxes I must "send TT as graphics" instead of the default "send TT
> as bitmaps". In any case, IIUC, the idea is to bypass the printer
> fonts completely (which is slower but safer I suppose) when
> printing text that might include "exotic" characters like the
> accented consonants of Esperanto (c, g, h, j, s with circumflex and
> u with breve).
Using send TT as graphics gets around the problem of missing or
mismatched fonts on a printer. In a way cheaper printers with
Windows are more predictable since Windows will alwys pre-raster text
and you always get what you see on screen. Using GhostScript to pre-
raster PostScript files before sending them to the printer is the
same thing really.
The only other reliable method is to include a copy (possibly a
subset) of the font in the data sent to the printer, but that
requires a more expensive printer with an embedded font interpreter
and that then just opens up another Pandora's box of issues.
TTFN
Mike
--
Laugh, and the world ignores you. Crying doesn't help either.
Yasuhiro Matsumoto wrote:
> On Sat, Mar 20, 2004 at 01:38:43PM +0100, Bram Moolenaar wrote:
> >
> > A long time ago Yasuhiro Matsumoto reported that mapping <M-x> doesn't
> > work when using a double-byte encoding. I now looked into this and came
> > to the conclusion that the solution is to avoid setting the 8th bit of
> > the character. If we do this everywhere and use the ALT modifier it
> > should work.
> >
> > However, I can only partly test this. Please try out the patch below.
> [snip]
>
> Sorry, i might report without the way of reproduce.
> on GTK, it _already_ can work with <m-x>.
>
> These are the environments which don't work with <m-x>
>
> 1. win32 gui
> can't map <m-x>.
> if type <m-x> 2 times on insert mode,
>
> 0xf8f8 is appear.
>
> 2. win32 gui
> same as win32 gui.
Did you mean "console" here?
> I guess that vgetorpeek() cause this problem.
> Some encoding have <m-x> in trail-byte.
> i.e. even if i apply your patch, i can't input <m-x>.
> With following patch, vgetorpeek accept <m-x> if typebuf have only
> one character.
I thought I already said a few times that this is the wrong solution.
It will cause trouble for when the double-byte character is mapped and
is a hack anyway.
The right solution is to pass <M-x> not as a 'x' with the 8th bit set
but as a 'x' with the ALT modifier. Apparently that doesn't happen
yet on Win32.
Strange, I would think the change in misc2.c does solve this. Perhaps
you can find out what happens in extract_modifiers() when typing <M-x>?
--
In a world without walls and borders, who needs windows and gates?
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
Hi list,
I've also posted this message on the vim-mac list because it concerns
Terminal.app application from Apple and UTF-8 encoding.
When i set my terminal to UTF-8, and in vim i do :set encoding=utf-8
and :set termencoding=utf-8, i don't get the right characters for "é"
and stuff.
but, if i set my Terminal.app with ISO latin1, and vim with :set
encoding=utf-8 and :set termencoding=latin1, i get good results.
I don't think this is normal.
can someone tell me what's wrong ?
thanks
julien
I am using Mac OS 10.3.3 on a powerbook, french keyboard, vim 6.1 from
Fink
Bram -
> > > > I updated this patch for 6.2.374.
> > > > Please let me know me how this is working.
> > >
> > > When running Vim with GTK2 and this patch, the moment I enter Insert
> > > mode, I get this warning:
> > >
> > > (gvim:32083): Gtk-CRITICAL **: file gtkimcontext.c: line 420
(gtk_im_context_set_use_preedit): assertion `GTK_IS_IM_CONTEXT (context)' failed
> >
> > I can't reproduce it.
> > Did you do "gvim -u NONE -U NONE" ?
> > Please let me know the following environment.
> >
> > $XMODIFIERS
> > $GTK_IM_MODULE
>
> These are not set. I'm using a us English environment. Don't have
> anything set for the input method, I don't know what GTK 2 uses for
> default.
>
> I can only say this didn't happen before including your patch.
> It doesn't happen when editing the command line.
> It doesn't happen if I do ":set imdisable" first.
> It does happen when:
> :set imdisable
> insert some lines
> :set noimdisable
> insert some text <-- get the message again.
>
>
> With a bit of debugging I discovered where it happens: In function
> xim_reset(), the second call to gtk_im_context_set_use_preedit with
> arguments (xic, TRUE).
>
> Strange thing is that it only happens the first time I enter Insert
> mode. Perhaps calling im_shutdown() has something to do with it?
> If you use im_activatekey_keyval then you will skip this call.
I tested
LANG=en_US vim -gf -u NONE -NONE
and I found a cause of problem.
as your said, if imak don't set, I got the warning as above.
I made the patch again.
Please check. (I changed xim_reset())
Thanks
- Yasuhiro
--
hundred-and-one symptoms of being an internet addict:
217. Your sex life has drastically improved...so what if it's only cyber-sex!
Yasuhiro Matsumoto wrote
> > > When running Vim with GTK2 and this patch, the moment I enter Insert
> > > mode, I get this warning:
> > >
> > > (gvim:32083): Gtk-CRITICAL **: file gtkimcontext.c: line 420
(gtk_im_context_set_use_preedit): assertion `GTK_IS_IM_CONTEXT (context)' failed
> I tested
> LANG=en_US vim -gf -u NONE -NONE
>
> and I found a cause of problem.
> as your said, if imak don't set, I got the warning as above.
>
> I made the patch again.
> Please check. (I changed xim_reset())
There are quite a few differences with the previous patch you sent:
- change in ex_getln.c is missing: call to im_is_preediting().
- first change in gui_gtk_x11.c is missing "cancel or type backspace..."
- in mbyte.c there are a few strange differences.
Looks like you made this patch against a different version of Vim.
The relevant change, moving im_shutdown():
! if (!p_imdisable)
! im_shutdown();
else
{
! gtk_im_context_set_use_preedit(xic, TRUE);
xim_set_focus(gui.in_focus);
Shouldn't that be:
! if (p_imdisable)
! im_shutdown();
else
{
! gtk_im_context_set_use_preedit(xic, TRUE);
xim_set_focus(gui.in_focus);
Then the warning message is indeed gone.
--
hundred-and-one symptoms of being an internet addict:
187. You promise yourself that you'll only stay online for another
15 minutes...at least once every hour.
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
Bram -
> > > > When running Vim with GTK2 and this patch, the moment I enter Insert
> > > > mode, I get this warning:
> > > >
> > > > (gvim:32083): Gtk-CRITICAL **: file gtkimcontext.c: line 420
(gtk_im_context_set_use_preedit): assertion `GTK_IS_IM_CONTEXT (context)' failed
>
> > I tested
> > LANG=en_US vim -gf -u NONE -NONE
> >
> > and I found a cause of problem.
> > as your said, if imak don't set, I got the warning as above.
> >
> > I made the patch again.
> > Please check. (I changed xim_reset())
>
> There are quite a few differences with the previous patch you sent:
>
> - change in ex_getln.c is missing: call to im_is_preediting().
> - first change in gui_gtk_x11.c is missing "cancel or type backspace..."
> - in mbyte.c there are a few strange differences.
>
> Looks like you made this patch against a different version of Vim.
>
> The relevant change, moving im_shutdown():
>
> ! if (!p_imdisable)
> ! im_shutdown();
> else
> {
> ! gtk_im_context_set_use_preedit(xic, TRUE);
> xim_set_focus(gui.in_focus);
>
> Shouldn't that be:
>
> ! if (p_imdisable)
> ! im_shutdown();
> else
> {
> ! gtk_im_context_set_use_preedit(xic, TRUE);
> xim_set_focus(gui.in_focus);
>
> Then the warning message is indeed gone.
Sorry, I re-maked it.
(.rej file was in the directory)
Thanks
- Yasuhiro
--
hundred-and-one symptoms of being an internet addict:
103. When you find yourself in the "Computer" section of Barnes & Noble
enjoying yourself.