Created
July 11, 2014 14:28
-
-
Save ksob/36c75b10463e6a2d08aa to your computer and use it in GitHub Desktop.
Why there are no polish chars in XML?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The string is properly sent from ruby pdf_generator because we are sending: | |
const unsigned int modFileSize = 2089; | |
const char modFile[] = { | |
0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D, 0x22 | |
, 0x31, 0x2E, 0x30, 0x22, 0x20, 0x65, 0x6E, 0x63, 0x6F, 0x64, 0x69, 0x6E, 0x67, 0x3D, 0x22 | |
, 0x75, 0x74, 0x66, 0x2D, 0x38, 0x22, 0x3F, 0x3E, 0x0A, 0x3C, 0x46, 0x3E, 0x0A, 0x20, 0x20 | |
, 0x3C, 0x44, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x4E, 0x3E, 0x46, 0x61, 0x6B, 0x74 | |
, 0x75, 0x72, 0x61, 0x20, 0x73, 0x70, 0x72, 0x7A, 0x65, 0x64, 0x61, 0xC5, 0xBC, 0x79, 0x3C | |
, 0x2F, 0x4E, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x4F, 0x64, 0x62, 0x69, 0x6F, 0x72 | |
, 0x63, 0x61, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x47, 0x55, 0x49, 0x44 | |
, 0x3E, 0x35, 0x32, 0x65, 0x30, 0x62, 0x32, 0x61, 0x38, 0x2D, 0x37, 0x32, 0x64, 0x34, 0x2D | |
, 0x34, 0x38, 0x37, 0x30, 0x2D, 0x61, 0x61, 0x64, 0x38, 0x2D, 0x35, 0x62, 0x65, 0x36, 0x37 | |
, 0x34, 0x61, 0x65, 0x30, 0x61, 0x34, 0x37, 0x3C, 0x2F, 0x47, 0x55, 0x49, 0x44, 0x3E, 0x0A | |
, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x4B, 0x6F, 0x64, 0x3E, 0x61, 0x73, 0x64, 0x66 | |
, 0x3C, 0x2F, 0x4B, 0x6F, 0x64, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x4E | |
, 0x61, 0x7A, 0x77, 0x61, 0x3E, 0x61, 0x73, 0x64, 0x66, 0x3C, 0x2F, 0x4E, 0x61, 0x7A, 0x77 | |
, 0x61, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x55, 0x6C, 0x69, 0x63, 0x61 | |
, 0x3E, 0x41, 0x6C, 0x2E, 0x20, 0x53, 0x6F, 0x6C, 0x69, 0x64, 0x61, 0x72, 0x6E, 0x6F, 0xC5 | |
, 0x9B, 0x63, 0x69, 0x3C, 0x2F, 0x55, 0x6C, 0x69, 0x63, 0x61, 0x3E, 0x0A, 0x20, 0x20, 0x20 | |
, 0x20, 0x20, 0x20, 0x3C, 0x4E, 0x75, 0x6D, 0x65, 0x72, 0x44, 0x6F, 0x6D, 0x75, 0x3E, 0x31 | |
, 0x32, 0x3C, 0x2F, 0x4E, 0x75, 0x6D, 0x65, 0x72, 0x44, 0x6F, 0x6D, 0x75, 0x3E, 0x0A, 0x20 | |
, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x4E, 0x75, 0x6D, 0x65, 0x72, 0x4C, 0x6F, 0x6B, 0x61 | |
, 0x6C, 0x75, 0x2F, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x4B, 0x6F, 0x64 | |
, 0x50, 0x6F, 0x63, 0x7A, 0x74, 0x6F, 0x77, 0x79, 0x2F, 0x3E, 0x0A, 0x20, 0x20, 0x20, 0x20 | |
, 0x20, 0x20, 0x3C, 0x4D, 0x69, 0x65, 0x6A, 0x73, 0x63, 0x6F, 0x77, 0x6F, 0x73, 0x63, 0x3E | |
, 0xC5, 0x9A, 0x6C, 0xC4, 0x85, 0x73, 0x6B, 0x20, 0x43, 0x69, 0x65, 0x73, 0x7A, 0x79, 0xC5 | |
, 0x84, 0x73, 0x6B, 0x69, 0x3C, 0x2F, 0x4D, 0x69, 0x65, 0x6A, 0x73, 0x63, 0x6F, 0x77, 0x6F | |
But on the CreatedPDF.java end for ż character we got: | |
/Users/developer/Desktop/Screen Shot 2014-07-11 at 15.34.04 | |
7a | |
65 | |
64 | |
61 | |
ffffffC5 | |
ffffffBC | |
79 | |
3c | |
(ż in utf-8 is C5BC (http://macchiato.com/unicode/convert.html)) | |
TODO: | |
First check if it passess if it works when we setMoreInfo(byte(C5BC)) | |
If it works then check why there is fffff in front of it, maybe in ThreadServer...java is a problem with MacRoman charset or similar |
change fuji_pdf_server:
start = 'java -Dfile.encoding=UTF8 -classpath ....
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git stash pop on demo_fixes branch of sageone_pl to get simplified xml_builder for testing