Open ForNeVeR opened 9 years ago
I think that there's encoding problem somewhere (it looks like some component decodes Unicode bytes to my OS default encoding)
That's right because the problem was locally solved by setting -Dfile.encoding=UTF-8
. But that means that Dandelion is messing the encodings somewhere and using the default one instead of UTF-8.
Thanks for reporting, and for your investigation. I'll look into this before the next release.
FYI, this bug will be fixed with my PR to the main repository: https://github.com/dandelion/dandelion/pull/108
Consider this
resources/dandelion/datatables/datatables.properties
:(That's properly uglified Russian Unicode, that will render as "Показаны записи START—END из TOTAL"; I have to "uglify" that with
native2ascii
due to Java handling of.properties
files.)It seems to work correctly (I've traced it to
com.github.dandelion.core.scripting.ScriptingUtils.prettyPrintJs
and it looks like a valid Unicode string there).But when my browser downloads configuration JS file (such as
/dandelion-assets/08dc0a3672b81af9bb2af7b4ff3c7b20/4c8a49b8ef4515c81a3671199b122b1c/js/dandelion-datatables-d09e05f878ceffc9f7dc3360b71dbdcc.js
) after the initial Datatable loading, all that Unicode is totally scrambled; it looks likeI've checked the headers for this
dandelion-datatables-*.js
response and they're all okay: it is reported as a valid UTF-8 file but it does not include the content I see in debugger and I want to see in the output.What am I doing wrong here?
I think that there's encoding problem somewhere (it looks like some component decodes Unicode bytes to my OS default encoding), but I still haven't found the server code that renders this JavaScript config to the HTTP request output stream.
Also I have no luck with setting my own
MessageResolver
- it gets loaded and created, but itsgetResource
method never gets called (maybe that's distinct problem and I will file another issue if you want).