Wkhtmltoxsharp no cyrillic - asp.net

I am using wkhtmltopdf with wkhtmltoxsharp wrapper. When I try to convert HTML to "pdf" it converts it, but only when the text is latin. I cannot convert Cyrillic text, i get some strange characters.
Can you please help me, if you know any solution?

I have tested wkhtmltopdf with cyrilic, chinese and korean and they all work for me. Do you do the conversion on your desktop or on a server? It could be that the server does not have proper fonts the installed - that commonly causes this problem.
Also, it would help to see a little example of the content you are converting and the command (or piece of code) you use to convert.

Related

inDesign ebook not printing font from character style

I have an inDesign document that uses a character style to change ü to wingdings which prints a check mark. This works perfectly throughout the document and when I export to PDF, but not in an eBook. In the eBook the check is just the regular ü. I am getting an error message about the css, but I don't see anyplace that addresses fonts in the export. Does anyone know of a way around this? Thank you!

HTML entities are not displayed properly

I'm building a website with Wordpress, but sometimes (I don't know why) the html entities declared in my php files are displayed as a � (a black diamond with a white question mark). My charset attribute is already set to UTF-8 (as shown in the picure below). It could be a problem of the text editor (I'm currently using the built-in editor of Aruba)... How can I make sure that the encoding is right?
Try copying your code files into notepad++ and make sure that the encoding is actually set to UTF-8 without BOM.

Display japanese string in qt and qml

I have a QString which contains a japanese string. But while debugging its just showing "???" in place of string. I need it to display it in qml. I have used QtextCodec but didnt work for me. Please give any solution or suggestion to fix the issue.
Have you tried this?
label->setText(QString::fromLocal8Bit("日本語"));
Save source file in UTF-8 (or other which can encode your characters) encoding
Set default codec with QtextCodec (I've tried, and it is working without this setting, too).
Use label->setText(QString::fromWCharArray(L"日本語"));

Special char added to css (​) where did this come from?

I was doing a bunch of search-replace operations in notepad++ to effectively minify my css - mostly removing whitespace/tabs etc...) This ended up breaking much of my css.
Apparently a strange character (​) was inserted all over the place) Using notepad++ in UTF-8 without BOM, I cannot see these, but they appeared in a view-source.
I was able to remove these by doing a search replace in ANSI encoding, but my question is, what is this character, and why might it have appeared?
The string “​” is the UTF-8 encoded form of ZWSP when misinterpreted as windows-1252 encoded data. (Checked this using a nice UTF-8 decoder.) This explains why you don’t see it in Notepad++ in UTF-8 mode; ZWSP (zero-width space) is an invisible character with no width.
Apparently browsers are interpreting the style sheet as windows-1252 encoded. Saving the file with BOM might help, since then browsers would probably guess the encoding better. The real fix is to make sure (in a server-dependent manner) that the server sends appropriate Content-Type header for the CSS file.
But if this is the only non-Ascii character in your CSS file, it does not matter in practice, after you have removed the offending data.
I don’t know of any simple way to make Notepad++ insert ZWSP (you could of course use general character insertion utilities in the system), so it’s a bit of mystery where it came from. Perhaps via copy and paste from somewhere.
Using the web developer plug in or ext in Firefox you can see the problem character in the css document.
In Visual Studio all I could see was:
}
.t
Web developer showed an unwanted hidden character, an "a" with a caret on top:
}
â.t
The utf encoder link above revealed this
} (the encoded character for ampersand)
.t
and this
but simply fix the problem by deleting and retyping.

Why does writeUTFBytes mess up non-english characters?

I'm writing all sorts of multi lingual text to .txt files using AIR's
fileStream.writeUTFBytes()
For english characters everything works perfectly. But as soon as there are chinese, arabic or any other non-english characters the sentences are totally messed up.
For example:
对着大叔摄影师的确没爱....
becomes
对着大叔摄影师的确没爱....
How can this be fixed?
writeUTFBytes doesn't mess up anything since it doesn't process the content.
Whatever goes in the pipe comes out.
The text you are sending is most likely encoded in Unicode/UTF-8
Make sure that you are openning the file with an editor that supports unicode (even Windows Notepad supports it, but it defaults to ANSI).

Resources