Jirka Nejedly wrote:If the data contains characters with diacritics, the chars are read wrong (cannot get ascii code,
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Tim Holloway wrote:Java does not use UTF-8 internally. It uses Unicode and only Unicode for Strings. UTF-8 is an external representation of Unicode that allows for eliminating redundant bytes.
Tim Holloway wrote:To be certain, I would do a hex dump of these "Strings" that you're getting from JDBC and see if their code points match Unicode encoding or CP1250 encoding.
Mike Simmons wrote:
This gets a bit messy. UTF-8 is part of Unicode, as is UTF-16 which is the one used by String, according to its own JavaDoc. Historically and in JDK 8 (which Jiri is using), this is implemented with a char[] array to store the data inside the String class. But if you look at a more modern JDK you will see that internal to the String class it uses a byte[] array, encoded using either UTF-16 or Latin-1 - the latter being more compact as long as you don't need any more exotic characters.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.
Run away! Run away! Here, take this tiny ad with you:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|