I want to use pdf output in my program, where I have to use czech characters (ěščřžýáíéůú etc..), but I'm still not able to do that. I tried lot of variants, but without any success, could anyone help me please?

Here is my test code: (as you can see, I tried lot of different encodings but all of them gives me still same output

Code: Select all

```
wxPdfFontManager* fontManager = wxPdfFontManager::GetFontManager();
wxPdfFont mujfont = fontManager->GetFont(wxT("Arial"), wxPDF_FONTSTYLE_BOLD);
AddPage();
SetFont(mujfont, wxPDF_FONTSTYLE_REGULAR, 16);
Cell(0,10,wxT("This is font (WinAnsi encoding)ěščřžýáíé"));
Ln(10);
Cell(0,10,str);
Ln(10);
Cell(0,10,str2);
Ln(10);
mujfont.SetEncoding(wxT("cp-1251"));
SetFont(mujfont, wxPDF_FONTSTYLE_REGULAR, 16);
Cell(0,10,wxT("This is font (CP-1251 encoding)ěščřžýáíé"));
Ln(10);
Cell(0,10,cyrillicText);
Ln(10);
Cell(0,10,str);
Ln(10);
Cell(0,10,str2);
Ln(10);
mujfont.SetEncoding(wxT("Windows-1250"));
SetFont(mujfont, wxPDF_FONTSTYLE_REGULAR, 16);
Cell(0,10,wxT("This is font (windows 1250 encoding)ěščřžýáíé"));
Ln(10);
Cell(0,10,cyrillicText);
Ln(10);
Cell(0,10,str);
Ln(10);
Cell(0,10,str2);
Ln(10);
mujfont.SetEncoding(wxT("UTF-8"));
SetFont(mujfont, wxPDF_FONTSTYLE_REGULAR, 16);
Cell(0,10,wxT("This is font (utf8 encoding)ěščřžýáíé"));
Ln(10);
Cell(0,10,cyrillicText);
Ln(10);
Cell(0,10,str);
Ln(10);
Cell(0,10,str2);
Ln(10);
mujfont.SetEncoding(wxT("iso-8859-2"));
SetFont(mujfont, wxPDF_FONTSTYLE_REGULAR, 16);
Cell(0,10,wxT("This is font (iso-8859-2 encoding)ěščřžýáíé"));
Ln(10);
Cell(0,10,cyrillicText);
Ln(10);
Cell(0,10,str);
Ln(10);
Cell(0,10,str2);
Ln(10);
```

This is output that I get

Thanks a lot in advance.This is font (WinAnsi encoding)?š??žýáíé

?????µ??

?›?????™???????-?-?©

This is font (CP-1251 encoding)?š??žýáíé

Tchaikovsky ?š??žýáíé- ????o?????

?????µ??

?›?????™???????-?-?©

This is font (windows 1250 encoding)?š??žýáíé

Tchaikovsky ?š??žýáíé- ????o?????

?????µ??

?›?????™???????-?-?©

This is font (utf8 encoding)?š??žýáíé

Tchaikovsky ?š??žýáíé- ????o?????

?????µ??

?›?????™???????-?-?©

This is font (iso-8859-2 encoding)?š??žýáíé

Tchaikovsky ?š??žýáíé- ????o?????

?????µ??

?›?????™???????-?-?©

Tomáš