Comment 32 for bug 942050

Revision history for this message
David Mathog (mathog) wrote :

My code page was 437. Changed it to 850 and it didn't make any difference with the existing binary. Possibly it would if I recompiled from scratch with it set to that.

symbol.ttf is in C:\Windows|Fonts here too.

In any case, I have found the problem, or at least part of it. The program which created the problematic delta's encoded them as F064. It turns out that is in the "private use area" F020-F0FF that Microsoft used to map Symbol (and other fonts, wingdings too I think) onto ASCII 20-FF. (I know for a fact that that application uses Richedit, so this is not surprising.) So start with F064, knock of the F0 to get 64, and find that it is ASCII lower case "d", as appropriate for a delta in symbol font. Inkscape doesn't know anything about this private use area though, and just leaves it as F064, which makes a mess, at least on my system. There is a call to:

  g_utf16_to_utf8

at around line 1858 in emf-win32-inout.cpp which is responsible for dumping the UTF8 representation of F065 into the ascii string. If you drop a print statement of some sort in after that conversion, on your system, does it come out with "d" or with the 3 character utf-8 representation? I see the latter. For lack of a better method, I did this using this line:

ofstream myfile; myfile.open ("debug.txt",ios::out | ios::app); myfile << "EMR_EXTTEXTOUTW ansi " <<ansi_text << " characters " << pEmr->emrtext.nChars<< endl; myfile.close();

and

#include <iostream>
#include <fstream>
using namespace std;

up at the top of the file.