At 20:50 19.03.01 +0100, Cyrille Chepelov wrote:
>Oh, (sorry, I sorely lacked time to report this) ; when exporting files with
>ISO8859-1 characters (such as éèàâê) (\'e\`e\'a\^a\^e in latexish) into WMF,
>it looks like something in the process converts stuff into UTF8, but doesn't
>do it all the way: in the final printout, you see two characters for each
>original accented character (ie, you get éèàâê for the previous
>string). 

Can reproduce it but don't know how to fix. My current tip for such problems:
simply drop your native language (if it doesn't conform to 7bit asci),
while using computers (as we all have learned 10 years ago :)  ...

>Looks to me that there's a conversion to wide chars somewhere, then the WMF
>still thinks the result is 8859-1 [OS was NT 4.0 with whatever SP du jour,
>same results with Win2K]
>
And same results wit Win98. The current version simply uses TextOutA
without any string conversion. I've tried the Unicode version as well, but
it didn't solve the problem. Or maybe my conversion was wrong ?

>Hmmm.... I sense some evil between the use of ANSI_CHARSET in
>wmf.cpp/set_font(), and the call to W32::TextOut in draw_string()... Which
>version of TextOut is called ? 
>
see above. I've even tried different *_CHARSET but no success. NLS is
definetly not my favourite. AFAIK Dia is using ANSI internally, but who
knows ?

>BTW, did anyone compile dia under (!msvc) ? (cygnus ?) There are a few things
>I'd like to check, especially w.r.t printing and utf8 [in particular, I'd
>like to make charconv.[ch] work in Win32, even if we're not going to turn
>this code on for general use.
>
!msvc ? cygnus : (what?)

I'm not sure if I understood your question. Do you search for someone not
using the ms vc compiler or the ms vc runtime or ?

>> All your signal code isn't compileable with msvc, but it is not needed on
>> windoze anymore anyway. I've changed the - never working - pipe execution
>> to something more appropriate for windoze. Direct writing to the default
>> printer.
>> [
>>  It is to introduce the next Win User FAQ: 
>>  Q: When printing I get many pages of text starting with: 
>>     %!PS-Adobe-2.0. What to do?
>>  A: Buy a postscript printer or implement GDI printing ... :-)
>> ]
>
>Could we instead require GhostScript and pipe stuff to it (okay, batch stuff
>to it. something like:

You *really* don't want this, because :
1) the windoze pipe support is seriously broken
2) Dia should not get a X MB dependency as replacement for 130 loc ?
2b) James suggestion (to install a gs printer driver) may work for those
unlucky without a postscript printer ?

>   s = tempfile.mktemp()+'.bat' 
>   open(s,"w").write( \
>"""c:\path\to\gs\gs --whatever --to --make --it --print c:\temp\foo.ps
>del c:\temp\foo.ps
>del s""")
>   #then call the regular postscript export to c:\temp\foo.ps, and finally 
>   spawn(s)
> ??
>
If you could provide a tested patch, I'll be glad to make it another print
option, but the real sollution would be to implement GDI printing (i.e.
based on the metafile rendering from my wmf-plug-in). Don't hold your
breath, it is very very low on my priority list.

Have fun,
        Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert

Reply via email to